-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Build and deploy snapshot | ||
|
||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
env: | ||
UTPLSQL_VERSION: ${{matrix.utplsql-version}} | ||
DB_IMAGE: ${{matrix.db_image}} | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
startegy: | ||
matrix: | ||
utplsql-version: [develop, v3.0.0, v3.1.6, v3.1.11] | ||
db_image: gvenzl/oracle-xe:11-full | ||
|
||
services: | ||
oracle: | ||
image: ${{matrix.db_image}} | ||
env: | ||
ORACLE_PASSWORD: oracle | ||
ports: | ||
- 1521:1521 | ||
# options: >- | ||
# --health-cmd healthcheck.sh | ||
# --health-interval 10s | ||
# --health-timeout 5s | ||
# --health-retries 10 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install utPLSQL ${{matrix.utplsql-version}} | ||
run: echo Installing ${UTPLSQL_VERSION} && sh ${{ github.workspace }}/scripts/1_install_utplsql.sh | ||
|
||
- name: Install utPLSQL-cli | ||
run: curl -Lk -o utPLSQL-cli.zip "https://github.com/utPLSQL/utPLSQL-cli/releases/download/v3.1.8/utPLSQL-cli.zip" && unzip utPLSQL-cli.zip && chmod -R u+x utPLSQL-cli | ||
|
||
- name: Install demo project | ||
run: sh ${{ github.workspace }}/scripts/2_install_demo_project.sh | ||
|
||
- name: Install unit tests | ||
run: sh ${{ github.workspace }}/scripts/3_install_tests.sh | ||
|
||
- name: Install run tests | ||
run: sh ${{ github.workspace }}/scripts/4_run_tests.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
docker run -d --name ora-utplsql -p 1521:1521 -e ORACLE_PASSWORD=oracle gvenzl/oracle-xe:18.4.0-slim |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
git clone --depth=1 --branch=${UTPLSQL_VERSION} https://github.com/utPLSQL/utPLSQL.git utPLSQL | ||
|
||
docker run --rm -v $(pwd)/utPLSQL:/utPLSQL -w /utPLSQL/source --network host \ | ||
--entrypoint sqlplus truemark/sqlplus:19.8 sys/oracle@//127.0.0.1:1521/XE as sysdba @install_headless.sql UT3 UT3 users |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
sys/oracle@//127.0.0.1:1521/XE as sysdba @source/create_users.sql | ||
|
||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @source/award_bonus/employees_test.sql | ||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @source/award_bonus/award_bonus.prc | ||
|
||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @source/between_string/betwnstr.fnc | ||
|
||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @source/remove_rooms_by_name/rooms.sql | ||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @source/remove_rooms_by_name/remove_rooms_by_name.prc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @test/award_bonus/test_award_bonus.pks | ||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @test/award_bonus/test_award_bonus.pkb | ||
|
||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @test/between_string/test_betwnstr.pks | ||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @test/between_string/test_betwnstr.pkb | ||
|
||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @test/remove_rooms_by_name/test_remove_rooms_by_name.pks | ||
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \ | ||
ut3_demo/ut3_demo@//127.0.0.1:1521/XE @test/remove_rooms_by_name/test_remove_rooms_by_name.pkb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
set -ev | ||
|
||
utPLSQL-cli/bin/utplsql run ut3_demo/ut3_demo@//127.0.0.1:1521/XE \ | ||
-source_path=source -test_path=test \ | ||
-f=ut_documentation_reporter -c \ | ||
-f=ut_coverage_sonar_reporter -o=coverage.xml \ | ||
-f=ut_sonar_test_reporter -o=test_results.xml \ | ||
--failure-exit-code=0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
create user ut3_demo identified by ut3_demo quota unlimited on USERS default tablespace USERS; | ||
|
||
grant create session, create procedure, create type, create table, create sequence, create view to ut3_demo; | ||
grant select any dictionary to ut3_demo; | ||
|
||
exit |