Skip to content

Commit 6cba3ae

Browse files
committed
Cleanup and simplifications to .travis.yml file.
Cleanup of scripts in `.travis` directory. Build performance improvement - minimizing invocations of `sqlcl` as it takes time to start it.
1 parent 7a30f6c commit 6cba3ae

20 files changed

Lines changed: 106 additions & 183 deletions

.travis.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,39 @@ services:
1919
- docker
2020

2121
env:
22+
# a build matrix for a version
2223
global:
2324
- UT3_OWNER=ut3
2425
- UT3_OWNER_PASSWORD=ut3
25-
- UT3_OWNER_TABLESPACE=users
2626
- UT3_USER=ut3_user
2727
- UT3_USER_PASSWORD=ut3
28-
- UT3_USER_TABLESPACE=users
28+
- UT3_TABLESPACE=users
2929
# Target Branch and Directory for Deployment of Docs
3030
- PAGES_TARGET_BRANCH="gh-pages"
3131
- PAGES_VERSION_BASE="version3"
3232
- CACHE_DIR=$HOME/.cache
3333
# Database Env
3434
- SQLCLI="$HOME/sqlcl/bin/sql"
3535
- ORACLE_PWD="oracle"
36-
- CONTAINER_IP=""
37-
- CONNECTION_STR=""
38-
- ORACLE_12cR1SE="12c-se-r1"
39-
- ORACLE_11gR2XE="11g-xe-r2"
4036
matrix:
41-
- ORACLE_VERSION=$ORACLE_12cR1SE
42-
- ORACLE_VERSION=$ORACLE_11gR2XE
37+
- ORACLE_VERSION="12c-se-r1" CONNECTION_STR='127.0.0.1:1521/ORCLPDB1'
38+
- ORACLE_VERSION="11g-xe-r2" CONNECTION_STR='127.0.0.1:1521/XE' DOCKER_OPTIONS='--shm-size=1g'
39+
4340

4441
cache:
42+
pip: true
4543
directories:
4644
- $CACHE_DIR
45+
- node_modules
4746

4847
install:
49-
- pip install -r .travis/python_req.txt
50-
- npm install -g phantomjs-prebuilt casperjs
48+
- pip install mkdocs
5149
- bash .travis/install_sqlcl.sh
5250
- bash .travis/start_db.sh
5351

5452
script:
55-
- CONTAINER_IP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ORACLE_VERSION)
56-
- test $ORACLE_VERSION = $ORACLE_12cR1SE && CONNECTION_STR="$CONTAINER_IP:1521/ORCLPDB1" || true
57-
- test $ORACLE_VERSION = $ORACLE_11gR2XE && CONNECTION_STR="$CONTAINER_IP:1521/XE" || true
58-
- bash .travis/create_utplsql_owner.sh
59-
- bash .travis/create_utplsql_user.sh
60-
- bash .travis/install_libraries.sh
6153
- bash .travis/install.sh
62-
- bash .travis/grant_user.sh
63-
- bash .travis/run_examples_as_owner.sh
64-
- bash .travis/run_test_as_owner.sh
65-
- bash .travis/run_examples_as_user.sh
66-
- bash .travis/create_release.sh
54+
- bash .travis/run_examples_and_tests.sh
6755
# - bash .travis/run_test_as_user.sh
6856
# - bash .travis/build_docs.sh
6957
# - bash .travis/push_docs_to_gh_pages.sh

.travis/create_utplsql_owner.sh

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

.travis/create_utplsql_owner.sql

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

.travis/create_utplsql_user.sh

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

.travis/create_utplsql_user.sql

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

.travis/grant_user.sh

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

.travis/install.sh

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,33 @@
11
#!/bin/bash
22

3+
cd "$(dirname "$(readlink -f "$0")")"
34
set -ev
4-
5-
cd source
65
#install core of utplsql
7-
"$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR @install.sql $UT3_OWNER
6+
"$SQLCLI" sys/$ORACLE_PWD@//$CONNECTION_STR AS SYSDBA <<-SQL
7+
pwd
8+
set feedback off
9+
set verify off
810
11+
@../source/create_utplsql_owner.sql $UT3_OWNER $UT3_OWNER_PASSWORD $UT3_TABLESPACE
12+
--only needed to run unit tests for utplsql v3, not required to run utplsql v3 itself
13+
grant select any dictionary to $UT3_OWNER;
914
15+
@../source/create_utplsql_owner.sql $UT3_USER $UT3_USER_PASSWORD $UT3_TABLESPACE
1016
cd ..
17+
18+
--enable plsql debug
19+
--cd development
20+
--@ut_debug_enable.sql
21+
--cd ..
22+
23+
cd source
24+
@install.sql $UT3_OWNER
25+
@create_synonyms_and_grants_for_user.sql $UT3_OWNER $UT3_USER
26+
cd ..
27+
1128
cd development
12-
#do style check
13-
"$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR @utplsql_style_check.sql
29+
conn $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR
30+
@utplsql_style_check.sql
1431
15-
#enable plsql debug
16-
#"$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR @ut_debug_enable.sql
32+
exit
33+
SQL

.travis/install_sqlcl.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ cd .travis
66

77
# Download if not present on cache dir.
88
if [ ! -f $CACHE_DIR/$SQLCL_FILE ]; then
9+
npm install -g phantomjs-prebuilt casperjs
910
bash download.sh -p sqlcl
1011
mv $SQLCL_FILE $CACHE_DIR
1112
else

.travis/python_req.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis/run_examples_and_tests.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
set -ev
4+
5+
"$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR <<SQL
6+
whenever sqlerror exit failure rollback
7+
whenever oserror exit failure rollback
8+
9+
cd examples
10+
@RunAllExamplesAsTests.sql
11+
12+
conn $UT3_USER/$UT3_USER_PASSWORD@//$CONNECTION_STR
13+
@RunUserExamples.sql
14+
15+
exit
16+
17+
SQL
18+
19+
"$SQLCLI" $UT3_OWNER/$UT3_OWNER_PASSWORD@//$CONNECTION_STR <<SQL
20+
cd tests
21+
@RunAll.sql
22+
exit
23+
SQL

0 commit comments

Comments
 (0)