add samples to the treatment endpoint result set #301
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Core tests | |
| on: | |
| push: | |
| pull_request_target: | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'Branch or PR to test (default: main)' | |
| required: false | |
| default: 'master' | |
| permissions: | |
| id-token: write # This is required for requesting the JWT | |
| contents: read # This is required for actions/checkout | |
| jobs: | |
| build: | |
| name: Setup and Test | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:5.7 | |
| env: | |
| MYSQL_ROOT_PASSWORD: root | |
| ports: | |
| - 3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=10 | |
| env: | |
| TEST_DB_CLICKHOUSE_PASSWORD: ${{ secrets.TEST_DB_CLICKHOUSE_PASSWORD }} | |
| TEST_DB_MYSQL_PASSWORD: ${{ secrets.TEST_DB_MYSQL_PASSWORD }} | |
| steps: | |
| - name: 'Checkout cbioportal repo' | |
| uses: actions/checkout@v2 | |
| 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@v4 | |
| with: | |
| path: ~/.m2 | |
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: ${{ runner.os }}-m2 | |
| - name: 'Setup mysql' | |
| run: | | |
| sudo systemctl start mysql && \ | |
| mysql --host=127.0.0.1 --port=3306 --user=root --password=root <<< 'SET GLOBAL local_infile=1' && \ | |
| mysql --host=127.0.0.1 --port=3306 --user=root --password=root <<< 'CREATE DATABASE cgds_test' && \ | |
| mysql --host=127.0.0.1 --port=3306 --user=root --password=root <<< "CREATE USER 'cbio_user'@'localhost' IDENTIFIED BY 'somepassword'" && \ | |
| mysql --host=127.0.0.1 --port=3306 --user=root --password=root <<< "GRANT ALL ON cgds_test.* TO 'cbio_user'@'localhost'" && \ | |
| mysql --host=127.0.0.1 --port=3306 --user=root --password=root <<< "flush privileges" | |
| - name: 'Copy maven settings' | |
| working-directory: ./cbioportal | |
| run: | | |
| mkdir -p ~/.m2 && \ | |
| cp .github/settings.xml ~/.m2 | |
| - name: 'Create application.properties' | |
| working-directory: ./cbioportal | |
| run: | | |
| cp src/main/resources/application.properties.EXAMPLE src/main/resources/application.properties | |
| - name: 'Create settings.xml for github packages' | |
| working-directory: ./cbioportal | |
| run: | | |
| echo "<settings><servers><server><id>github</id><username>${{ github.actor }}</username><password>${{ secrets.GITHUB_TOKEN }}</password></server></servers></settings>" > settings.xml | |
| - name: 'Build cBioPortal once without tests' | |
| working-directory: ./cbioportal | |
| run: | | |
| mvn --settings settings.xml -q -U -Ppublic -DskipTests clean install | |
| - name: 'Build cbioportal with tests' | |
| working-directory: ./cbioportal | |
| run: | | |
| mvn --settings settings.xml -q -U -Ppublic clean install | |
| - name: 'Run tests separately' | |
| working-directory: ./cbioportal | |
| run: | | |
| mvn -U -Ppublic test -Ddb.test.username=cbio_user -Ddb.test.password=somepassword | |
| - name: 'Run integration tests separately' | |
| working-directory: ./cbioportal | |
| run: | | |
| mvn verify -Pintegration-test | |
| - name: 'Run e2e tests separately' | |
| working-directory: ./cbioportal | |
| run: | | |
| mvn verify -Pe2e-test |