(WIP) Clickhouse migration mechanism #9662
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: | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'Branch or PR to test (default: main)' | |
| required: false | |
| default: 'master' | |
| permissions: | |
| 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 | |
| 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 -DskipTests clean install | |
| - name: 'Build cbioportal with tests' | |
| working-directory: ./cbioportal | |
| run: | | |
| mvn --settings settings.xml -q -U clean install | |
| - name: 'Run tests separately' | |
| working-directory: ./cbioportal | |
| run: | | |
| mvn -U test -Ddb.test.username=cbio_user -Ddb.test.password=somepassword | |
| # TODO: decide if we want to keep this in the future, or remove it entirely | |
| # - 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 |