Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable oracle tests #5683

Merged
merged 40 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
eb3ac7b
Try to test on Oracle XE
koppor Nov 30, 2019
f97c8af
Remove other workflows to speed up experiments
koppor Nov 30, 2019
5c983e5
Switch DB user from SYS to SYSDBA
koppor Nov 30, 2019
6d35fc1
Try lowercase username
koppor Nov 30, 2019
09268ad
sys -> sysoper
koppor Nov 30, 2019
02c4bad
"sysdba"
koppor Dec 1, 2019
39e3e21
Database XE -> XEPDB1
koppor Dec 1, 2019
2f0a588
Try "sys as sysdba"
koppor Dec 1, 2019
f2f7a5e
Use "/" as separator between port and DB (instead of :)
koppor Dec 1, 2019
6e9c51c
Try "system" as login name
koppor Dec 1, 2019
408528b
Test directly
tobiasdiez Dec 1, 2019
47e8e75
Create and use "jabref" user on Oracle
koppor Dec 1, 2019
7a2932e
Merge branch 'enable-oracle-tests' of github.com:JabRef/jabref into e…
koppor Dec 1, 2019
fbcba8d
Reenable test execution
koppor Dec 1, 2019
3df8a90
Try to remove escaping
koppor Dec 1, 2019
e003483
Let it succeed to get a working cache
tobiasdiez Dec 1, 2019
78c0174
Create separate DB
koppor Dec 2, 2019
3634759
Remove obsolete ";", creawte preparted statement and reformat code
koppor Dec 2, 2019
3e4254f
Merge branch 'enable-oracle-tests' of github.com:JabRef/jabref into e…
koppor Dec 2, 2019
f33853c
Revert "Remove other workflows to speed up experiments"
koppor Dec 2, 2019
e7b8a41
Fix wrong path separator in .yml
koppor Dec 2, 2019
6905388
Remove connection test
koppor Dec 2, 2019
bc21500
Integrate Oracle tests in our main build workflow
koppor Dec 2, 2019
6c220d0
Fix DBMSTypeTest
koppor Dec 2, 2019
b9e93c3
Fix caching key
koppor Dec 2, 2019
23d3789
Fix typo
koppor Dec 2, 2019
6918e7b
USe full path for buildres/setup-test-orcale.sql
koppor Dec 2, 2019
f567d62
Remove unused import
koppor Dec 2, 2019
1c729cd
Try to set path explicitly
koppor Dec 2, 2019
e432068
Try to get value of ORACLE_HOME
koppor Dec 2, 2019
7bccc6f
Hopefully fix path to sqlplus
koppor Dec 2, 2019
6bd25f1
Oracle takes some time to start
koppor Dec 3, 2019
8300979
Oracle needs more time to startup
koppor Dec 3, 2019
40d46bb
XEPDB1 is the right database to connect for creating database "jabref"
koppor Dec 3, 2019
d0cb20f
Try longer startup time and other initial DB
koppor Dec 3, 2019
f49419b
Remove step for docker image caching: does not find any docker images
koppor Dec 4, 2019
166bf63
Ensure one assertion for each test in DBMSTypeTest
koppor Dec 4, 2019
1a81d76
Merge remote-tracking branch 'origin/master' into enable-oracle-tests
koppor Dec 4, 2019
ebdcb98
Adress comments
koppor Dec 4, 2019
2861d5d
Remove caching of Oracle downloads
koppor Dec 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/refresh-csl-subtrees.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Refresh Citation Style Language Files

on:
schedule:
# run on 1th and 15th of each month
# run on 1st and 15th of each month
- cron: '1 2 1,15 * *'

jobs:
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/tests-oracle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Oracle Tests

on:
push:
paths:
- 'src/test/java/org/jabref/model/database/**'
- 'src/test/java/org/jabref/logic/shared/**'
- '.github/workflows/tests-oracle.yml'
- 'build.gradle'
schedule:
# run on each Wednesday
- cron: '2 3 * * 3'

jobs:
oracletests:
name: Oracle tests
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v1
with:
depth: 1
submodules: false
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 13
- uses: actions/cache@v1
name: Restore gradle chache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.OS }}-gradle-${{ env.cache-name }}-
${{ runner.OS }}-gradle-
${{ runner.OS }}-
- uses: actions/cache@v1
name: Restore gradle wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Start Oracle XE
run: |
mkdir ~/oracle-xe || true
cd ~/oracle-xe
wget -qN https://github.com/deusaquilus/docker-oracle-xe/archive/master.zip
unzip master.zip
cd docker-oracle-xe-master
wget -qN http://ccrypt.sourceforge.net/download/1.11/ccrypt-1.11.linux-x86_64.tar.gz
wget -qN -O files/oracle-database-xe-18c-1.0-1.x86_64.rpm.cpt https://files.jabref.org/thing.cpt
pwd
tar xzf ccrypt-1.11.linux-x86_64.tar.gz
ccrypt-1.11.linux-x86_64/ccrypt -d -E CCRYPT files/oracle-database-xe-18c-1.0-1.x86_64.rpm.cpt
docker build -t oracle-xe:18c .
docker run -d -p 32118:1521 -p 35518:5500 --name=oracle-xe oracle-xe:18c
# give oracle some time to start
sleep 300
docker logs oracle-xe
# path `/opt/oracle/product/18c/dbhomeXE` is taken from the `Dockerfile` used to build "oracle-xe"
docker exec -i oracle-xe bash -c "source /home/oracle/.bashrc; /bin/bash -c '/opt/oracle/product/18c/dbhomeXE/bin/sqlplus sys/Oracle18@localhost/XE as sysdba'" < $GITHUB_WORKSPACE/buildres/setup-test-oracle.sql
env:
CCRYPT: ${{ secrets.CCRYPT }}
- name: Run database test
run: ./gradlew databaseTest --rerun-tasks
env:
DBMS: "oracle"
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
with:
java-version: 13
- uses: actions/cache@v1
name: Restore gradle chache
name: Restore gradle cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
if: failure()
run: |
sudo apt-get install -qq -y xml-twig-tools xsltproc
scripts/after-failure.sh
scripts/after-failure.sh
databasetests:
name: Database tests
runs-on: ubuntu-latest
Expand Down Expand Up @@ -227,7 +227,7 @@ jobs:
name: Restore gradle wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Update test coverage metrics
run: xvfb-run --auto-servernum ./gradlew jacocoTestReport && bash <(curl -s https://codecov.io/bash);
env:
Expand Down
6 changes: 6 additions & 0 deletions buildres/setup-test-oracle.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
create pluggable database jabref admin user jabref identified by jabref
file_name_convert=('/opt/oracle/oradata/XE/pdbseed','/opt/oracle/oradata/XE/JABREF');
alter pluggable database jabref open read write;
alter pluggable database all save state;
ALTER SESSION SET CONTAINER = jabref;
grant all privileges to jabref container=current;
Loading