-
Notifications
You must be signed in to change notification settings - Fork 516
85 lines (85 loc) · 3.74 KB
/
integration-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Integration tests
on: [push, pull_request]
jobs:
build:
name: Integration tests
runs-on: ubuntu-latest
env:
PORTAL_SOURCE_DIR: /home/runner/work/cbioportal/cbioportal/cbioportal
PORTAL_COMPOSE_DIR: /home/runner/work/cbioportal/cbioportal/cbioportal-docker-compose
PORTAL_INFO_DIR: /home/runner/work/cbioportal/cbioportal/portalInfo
steps:
- name: 'Checkout cbioportal repo'
uses: actions/checkout@v4
with:
path: ./cbioportal
- name: 'Set up JDK 21'
uses: oracle-actions/setup-java@v1
with:
website: oracle.com
release: 21
- name: 'Cache Maven packages'
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: 'Copy application.properties'
working-directory: ./cbioportal
run: |
cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties
- name: 'Build cbioportal'
working-directory: ./cbioportal
run: |
mvn -DskipTests clean install
- name: 'Checkout cbioportal-docker-compose repo'
uses: actions/checkout@master
with:
repository: cbioportal/cbioportal-docker-compose
ref: demo-rfc72
path: ./cbioportal-docker-compose
- name: 'Initialize cbioportal-docker-compose'
working-directory: ./cbioportal-docker-compose
run: |
cd ./data && ./init.sh && rm -rf ./studies/* && cd ../config && \
cat $PORTAL_SOURCE_DIR/src/main/resources/application.properties | \
sed 's|spring.datasource.mysql.url=.*|spring.datasource.mysql.url=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false|' | \
sed 's|spring.datasource.mysql.username=.*|spring.datasource.mysql.username=cbio_user|' | \
sed 's|spring.datasource.mysql.password=.*|spring.datasource.mysql.password=somepassword|' \
> application.properties
- name: 'Copy cgds.sql file into Docker Compose'
run: cp ./cbioportal/src/main/resources/db-scripts/cgds.sql ./cbioportal-docker-compose/data/.
- name: 'Dump Properties'
working-directory: ./cbioportal-docker-compose
run: cat config/application.properties
- name: 'Start cbioportal-docker-compose'
working-directory: ./cbioportal-docker-compose
run: |
docker-compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml up -d
- name: 'Wait for cbioportal to initialize ...'
id: startup
uses: nev7n/wait_for_response@v1
with:
url: 'http://localhost:8080/api/health'
responseCode: 200
timeout: 900000
interval: 30000
- name: Log cBioPortal Service
if: ${{ failure() && steps.startup.conclusion == 'failure' }}
working-directory: ./cbioportal-docker-compose
run: docker-compose logs cbioportal
- name: 'TEST - Validate and load study_es_0'
if: steps.startup.conclusion == 'success'
working-directory: ./cbioportal-docker-compose
run: |
$PORTAL_SOURCE_DIR/test/integration/test_load_study.sh
- name: 'TEST - Add OncoKB annotations to study'
if: steps.startup.conclusion == 'success'
working-directory: ./cbioportal-docker-compose
run: |
$PORTAL_SOURCE_DIR/test/integration/test_integration_test_oncokb_import.sh
- name: 'TEST - Update OncoKB annotations'
if: steps.startup.conclusion == 'success'
working-directory: ./cbioportal-docker-compose
run: |
$PORTAL_SOURCE_DIR/test/integration/test_update_oncokb.sh