Skip to content

Commit e833eb7

Browse files
committed
Change to simple build
1 parent f8468ca commit e833eb7

12 files changed

+93
-135
lines changed

.github/workflows/build.yml

Lines changed: 20 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,12 @@ defaults:
1414

1515
jobs:
1616
build:
17-
runs-on: ubuntu-latest
18-
19-
env:
20-
ORACLE_VERSION: "gvenzl/oracle-xe:18.4.0-slim"
21-
UTPLSQL_VERSION: "3.1.13"
22-
UTPLSQL_FILE: "utPLSQL"
23-
ORACLE_PASSWORD: oracle
24-
DB_URL: "127.0.0.1:1521:XE"
25-
DB_USER: app
26-
DB_PASS: app
2717

28-
strategy:
29-
fail-fast: false
30-
matrix:
31-
utplsql_version: [ "v3.0.1","v3.0.2","v3.0.3","v3.0.4","v3.1.1","v3.1.2","v3.1.3","v3.1.6","v3.1.7","v3.1.8","v3.1.9","v3.1.10","v3.1.11","develop" ]
32-
utplsql_file: [ "utPLSQL" ]
33-
jdk: [ '8' ]
34-
include:
35-
- utplsql_version: "v3.0.0"
36-
jdk: '8'
37-
utplsql_file: "utPLSQLv3.0.0"
38-
- utplsql_version: "develop"
39-
jdk: '11'
40-
utplsql_file: "utPLSQL"
41-
- utplsql_version: "develop"
42-
jdk: '17'
43-
utplsql_file: "utPLSQL"
18+
runs-on: ubuntu-latest
4419

4520
services:
4621
oracle:
47-
image: gvenzl/oracle-xe:18.4.0-slim
22+
image: gvenzl/oracle-xe:21-slim
4823
env:
4924
ORACLE_PASSWORD: oracle
5025
ports:
@@ -54,25 +29,33 @@ jobs:
5429
--health-interval 10s
5530
--health-timeout 5s
5631
--health-retries 10
57-
--name oracle
5832
5933
steps:
6034
- uses: actions/checkout@v2
6135
with:
6236
fetch-depth: 0
6337

64-
- uses: actions/setup-java@v2
65-
with:
66-
distribution: 'temurin'
67-
java-version: ${{matrix.jdk}}
68-
69-
- name: Install utplsql
70-
run: scripts/install_utplsql.sh
38+
- name: Install utPLSQL
39+
run: sh ${{ github.workspace }}/scripts/1_install_utplsql.sh
7140

7241
- name: Install demo project
73-
run: scripts/install_demo_project.sh
42+
run: sh ${{ github.workspace }}/scripts/2_install_demo_project.sh
43+
44+
- name: Set up JDK 11
45+
uses: actions/setup-java@v2
46+
with:
47+
java-version: '11'
48+
distribution: 'adopt'
49+
50+
- name: Cache local Maven repository
51+
uses: actions/cache@v2
52+
with:
53+
path: ~/.m2/repository
54+
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
55+
restore-keys: |
56+
${{ runner.os }}-maven-
7457
75-
- name: Maven unit and integration tests with sonar
58+
- name: Maven unit and integration tests
7659
run: mvn clean verify
7760

7861
- name: Publish unit test results

scripts/0_start_db.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker run -d --name ora-utplsql -p 1521:1521 -e ORACLE_PASSWORD=oracle gvenzl/oracle-xe:21-slim

scripts/1_install_utplsql.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
UTPLSQL_DOWNLOAD_URL=$(curl --silent https://api.github.com/repos/utPLSQL/utPLSQL/releases/latest | awk '/browser_download_url/ { print $2 }' | grep ".zip\"" | sed 's/"//g')
2+
3+
curl -Lk "${UTPLSQL_DOWNLOAD_URL}" -o utPLSQL.zip
4+
5+
unzip -q utPLSQL.zip
6+
7+
docker run --rm -v $(pwd)/utPLSQL:/utPLSQL -w /utPLSQL/source --network host \
8+
--entrypoint sqlplus truemark/sqlplus:19.8 sys/oracle@//127.0.0.1:1521/XE as sysdba @install_headless.sql UT3 UT3 users

scripts/2_install_demo_project.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \
2+
sys/oracle@//127.0.0.1:1521/XE as sysdba @scripts/sql/create_users.sql
3+
4+
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \
5+
app/pass@//127.0.0.1:1521/XE @scripts/sql/create_app_objects.sql
6+
7+
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \
8+
code_owner/pass@//127.0.0.1:1521/XE @scripts/sql/create_source_owner_objects.sql
9+
10+
docker run --rm -v $(pwd):/work -w /work/ --network host --entrypoint sqlplus truemark/sqlplus:19.8 \
11+
tests_owner/pass@//127.0.0.1:1521/XE @scripts/sql/create_tests_owner_objects.sql

scripts/create_api_user.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

scripts/install_demo_project.sh

Lines changed: 0 additions & 34 deletions
This file was deleted.

scripts/install_utplsql.sh

Lines changed: 0 additions & 33 deletions
This file was deleted.

scripts/sql/create_app_objects.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
whenever sqlerror exit failure rollback
2+
whenever oserror exit failure rollback
3+
4+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/sources/TO_TEST_ME.sql
5+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/sources/APP.PKG_TEST_ME.pks
6+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/sources/APP.PKG_TEST_ME.pkb
7+
8+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/tests/APP.TEST_PKG_TEST_ME.pks
9+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/simple/scripts/tests/APP.TEST_PKG_TEST_ME.pkb
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
whenever sqlerror exit failure rollback
2+
whenever oserror exit failure rollback
3+
4+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/sources/foo/tables/TO_TEST_ME.sql
5+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/sources/foo/packages/PKG_TEST_ME.pks
6+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/sources/foo/package_bodies/PKG_TEST_ME.pkb
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
whenever sqlerror exit failure rollback
2+
whenever oserror exit failure rollback
3+
4+
create synonym TO_TEST_ME for CODE_OWNER.TO_TEST_ME;
5+
create synonym PKG_TEST_ME for CODE_OWNER.PKG_TEST_ME;
6+
7+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/test/bar/packages/TEST_PKG_TEST_ME.pks
8+
@src/test/resources-its/org/utplsql/maven/plugin/UtPlsqlMojoIT/owner_param/scripts/test/bar/package_bodies/TEST_PKG_TEST_ME.pkb

0 commit comments

Comments
 (0)