Skip to content

Add Chromoscope News #6717

Add Chromoscope News

Add Chromoscope News #6717

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
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.url=.*|spring.datasource.url=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false|' | \
sed 's|spring.datasource.username=.*|spring.datasource.username=cbio_user|' | \
sed 's|spring.datasource.password=.*|spring.datasource.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