Skip to content

Commit 42ec927

Browse files
committed
Merge branch 'develop' into bugfix/oracle_stuck_too_greedy
2 parents d568126 + b20727d commit 42ec927

File tree

8 files changed

+113
-36
lines changed

8 files changed

+113
-36
lines changed

.github/workflows/build.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Build and test
2+
on:
3+
push:
4+
branches: [ develop, feature/github_actions ]
5+
tags:
6+
- v*
7+
pull_request:
8+
branches: [ develop ]
9+
workflow_dispatch:
10+
11+
repository_dispatch:
12+
types: [utPLSQL-build,utPLSQL-java-api-build]
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
build:
20+
name: Test on JDK ${{ matrix.jdk }} with utPLSQL ${{ matrix.utplsql_version }}
21+
runs-on: ubuntu-latest
22+
env:
23+
ORACLE_VERSION: "gvenzl/oracle-xe:18.4.0-slim"
24+
UTPLSQL_VERSION: ${{matrix.utplsql_version}}
25+
UTPLSQL_FILE: ${{matrix.utplsql_file}}
26+
ORACLE_PASSWORD: oracle
27+
DB_URL: "127.0.0.1:1521:XE"
28+
DB_USER: app
29+
DB_PASS: app
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
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"]
35+
utplsql_file: ["utPLSQL"]
36+
jdk: ['8']
37+
include:
38+
- utplsql_version: "v3.0.0"
39+
jdk: '8'
40+
utplsql_file: "utPLSQLv3.0.0"
41+
services:
42+
oracle:
43+
image: gvenzl/oracle-xe:18.4.0-slim
44+
env:
45+
ORACLE_PASSWORD: oracle
46+
ports:
47+
- 1521:1521
48+
options: >-
49+
--health-cmd healthcheck.sh
50+
--health-interval 10s
51+
--health-timeout 5s
52+
--health-retries 10
53+
--name oracle
54+
55+
steps:
56+
- uses: actions/checkout@v2
57+
with:
58+
fetch-depth: 0
59+
- uses: actions/setup-java@v2
60+
with:
61+
distribution: 'adopt'
62+
java-version: ${{matrix.jdk}}
63+
cache: 'maven'
64+
65+
- name: Install utplsql
66+
run: .travis/install_utplsql.sh
67+
68+
- name: Install demo project
69+
run: .travis/install_demo_project.sh
70+
71+
- name: Build
72+
run: mvn package -DskipTests
73+
- name: Test
74+
run: mvn package verify jar:jar appassembler:assemble
75+
76+
slack-workflow-status:
77+
if: always()
78+
name: Post Workflow Status To Slack
79+
needs: [ build ]
80+
runs-on: ubuntu-latest
81+
steps:
82+
- name: Slack Workflow Notification
83+
uses: Gamesight/slack-workflow-status@master
84+
with:
85+
repo_token: ${{secrets.GITHUB_TOKEN}}
86+
slack_webhook_url: ${{secrets.SLACK_WEBHOOK_URL}}
87+
name: 'Github Actions[bot]'
88+
icon_url: 'https://octodex.github.com/images/mona-the-rivetertocat.png'

.travis/create_api_user.sh

100644100755
File mode changed.

.travis/create_release.sh

100644100755
File mode changed.

.travis/install_demo_project.sh

100644100755
Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
set -ev
2+
set -evx
33
cd $(dirname $(readlink -f $0))
44

55
PROJECT_FILE="utPLSQL-demo-project"
@@ -13,32 +13,22 @@ grant select any dictionary to ${DB_USER};
1313
exit
1414
SQL
1515
16-
cd ${PROJECT_FILE}
16+
cd /${PROJECT_FILE}
1717
sqlplus -S -L ${DB_USER}/${DB_PASS}@//127.0.0.1:1521/xe <<SQL
1818
whenever sqlerror exit failure rollback
1919
whenever oserror exit failure rollback
20+
@source/install.sql
21+
exit
22+
SQL
2023
21-
@source/award_bonus/employees_test.sql
22-
@source/award_bonus/award_bonus.prc
23-
24-
@source/between_string/betwnstr.fnc
25-
26-
@source/remove_rooms_by_name/rooms.sql
27-
@source/remove_rooms_by_name/remove_rooms_by_name.prc
28-
29-
@test/award_bonus/test_award_bonus.pks
30-
@test/award_bonus/test_award_bonus.pkb
31-
32-
@test/between_string/test_betwnstr.pks
33-
@test/between_string/test_betwnstr.pkb
34-
35-
@test/remove_rooms_by_name/test_remove_rooms_by_name.pks
36-
@test/remove_rooms_by_name/test_remove_rooms_by_name.pkb
37-
24+
sqlplus -S -L ${DB_USER}/${DB_PASS}@//127.0.0.1:1521/xe <<SQL
25+
whenever sqlerror exit failure rollback
26+
whenever oserror exit failure rollback
27+
@test/install.sql
3828
exit
3929
SQL
4030
EOF
4131

42-
docker cp ./$PROJECT_FILE $ORACLE_VERSION:/$PROJECT_FILE
43-
docker cp ./demo_project.sh.tmp $ORACLE_VERSION:/demo_project.sh
44-
docker exec $ORACLE_VERSION bash demo_project.sh
32+
docker cp ./${PROJECT_FILE} oracle:/${PROJECT_FILE}
33+
docker cp ./demo_project.sh.tmp oracle:/demo_project.sh
34+
docker exec oracle bash /demo_project.sh

.travis/install_utplsql.sh

100644100755
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,30 @@ cd $(dirname $(readlink -f $0))
44

55
# Download the specified version of utPLSQL.
66
if [ "$UTPLSQL_VERSION" == "develop" ]
7-
then
8-
git clone -b develop --single-branch https://github.com/utPLSQL/utPLSQL.git
9-
tar -czf $UTPLSQL_FILE.tar.gz $UTPLSQL_FILE && rm -rf $UTPLSQL_FILE
7+
then
8+
git clone -b develop --single-branch https://github.com/utPLSQL/utPLSQL.git
109
else
1110
curl -L -O "https://github.com/utPLSQL/utPLSQL/releases/download/$UTPLSQL_VERSION/$UTPLSQL_FILE.tar.gz"
11+
tar -xzf ${UTPLSQL_FILE}.tar.gz && rm ${UTPLSQL_FILE}.tar.gz
1212
fi
1313

14+
chmod -R go+w ./${UTPLSQL_FILE}/{source,examples}
1415
# Create a temporary install script.
1516
cat > install.sh.tmp <<EOF
16-
tar -xzf ${UTPLSQL_FILE}.tar.gz && rm ${UTPLSQL_FILE}.tar.gz
17-
cd ${UTPLSQL_FILE}/source
17+
cd /${UTPLSQL_FILE}/source
1818
sqlplus -S -L sys/oracle@//127.0.0.1:1521/xe AS SYSDBA @install_headless.sql ut3 ut3 users
1919
EOF
2020

2121
# Copy utPLSQL files to the container and install it.
22-
docker cp ./$UTPLSQL_FILE.tar.gz $ORACLE_VERSION:/$UTPLSQL_FILE.tar.gz
22+
docker cp ./${UTPLSQL_FILE} oracle:/${UTPLSQL_FILE}
2323
# docker cp ./$UTPLSQL_FILE $ORACLE_VERSION:/$UTPLSQL_FILE
24-
docker cp ./install.sh.tmp $ORACLE_VERSION:/install.sh
25-
docker cp ./create_api_user.sh $ORACLE_VERSION:/create_api_user.sh
26-
24+
docker cp ./install.sh.tmp oracle:/install.sh
25+
docker cp ./create_api_user.sh oracle:/create_api_user.sh
2726
# Remove temporary files.
2827
# rm $UTPLSQL_FILE.tar.gz
2928
rm -rf $UTPLSQL_FILE
3029
rm install.sh.tmp
3130

3231
# Execute the utPLSQL installation inside the container.
33-
docker exec $ORACLE_VERSION bash install.sh
34-
docker exec $ORACLE_VERSION bash create_api_user.sh
32+
docker exec oracle bash /install.sh
33+
docker exec oracle bash /create_api_user.sh

.travis/start_db.sh

100644100755
File mode changed.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![latest-release](https://img.shields.io/github/release/utPLSQL/utPLSQL-cli.svg)](https://github.com/utPLSQL/utPLSQL-cli/releases)
22
[![license](https://img.shields.io/github/license/utPLSQL/utPLSQL-cli.svg)](https://www.apache.org/licenses/LICENSE-2.0)
3-
[![build](https://img.shields.io/travis/utPLSQL/utPLSQL-cli/develop.svg?label=develop%20branch)](https://travis-ci.org/utPLSQL/utPLSQL-cli)
3+
[![Build status](https://github.com/utPLSQL/utPLSQL-cli/actions/workflows/build.yml/badge.svg)](https://github.com/utPLSQL/utPLSQL-cli/actions/workflows/build.yml)
44

55
----------
66
# utPLSQL-cli

src/test/java/org/utplsql/cli/RunCommandCoverageReporterIT.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020
class RunCommandCoverageReporterIT extends AbstractFileOutputTest {
2121

22-
private static final Pattern REGEX_COVERAGE_TITLE = Pattern.compile("<a href=\"[a-zA-Z0-9#]+\" class=\"src_link\" title=\"[a-zA-Z\\._]+\">([a-zA-Z0-9\\._]+)<\\/a>");
22+
private static final Pattern REGEX_COVERAGE_TITLE = Pattern.compile("<a href=\"[a-zA-Z0-9#]+\" class=\"src_link\" title=\"[a-zA-Z\\._ ]+\">([a-zA-Z ]+ )?([a-zA-Z0-9\\._]+)<\\/a>");
2323

2424

2525
private String getTempCoverageFileName(int counter) {
@@ -60,7 +60,7 @@ private boolean hasCoverageListed(String content, String packageName) {
6060
Matcher m = REGEX_COVERAGE_TITLE.matcher(content);
6161

6262
while (m.find()) {
63-
if (packageName.equals(m.group(1)))
63+
if (packageName.equals(m.group(2)))
6464
return true;
6565
}
6666

0 commit comments

Comments
 (0)