diff --git a/.github/workflows/build_client.yaml b/.github/workflows/build_client.yaml new file mode 100644 index 000000000000..0709ff949188 --- /dev/null +++ b/.github/workflows/build_client.yaml @@ -0,0 +1,32 @@ +name: Build client for selenium tests +on: + workflow_call: +jobs: + build-client: + runs-on: ubuntu-latest + outputs: + commit-id: ${{ steps.client-commit.outputs.commit }} + steps: + - uses: actions/checkout@v3 + with: + path: 'galaxy root' + - uses: actions/setup-node@v3 + with: + node-version: '18.12.1' + cache: 'yarn' + cache-dependency-path: 'galaxy root/client/yarn.lock' + - name: get client commit + id: client-commit + shell: bash + run: echo "commit=$(git rev-parse HEAD 2>/dev/null)" >> $GITHUB_OUTPUT + working-directory: 'galaxy root' + - name: cache client build + uses: actions/cache@v3 + id: cache + with: + key: galaxy-static-${{ steps.client-commit.outputs.commit }} + path: 'galaxy root/static' + - name: Build client + if: steps.cache.outputs.cache-hit != 'true' + run: make client + working-directory: 'galaxy root' diff --git a/.github/workflows/first_startup.yaml b/.github/workflows/first_startup.yaml index 10f506dbbedf..47c845bb878b 100644 --- a/.github/workflows/first_startup.yaml +++ b/.github/workflows/first_startup.yaml @@ -14,9 +14,11 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: - + build-client: + uses: ./.github/workflows/build_client.yaml test: name: Startup test + needs: build-client runs-on: ubuntu-latest strategy: fail-fast: false @@ -53,6 +55,11 @@ jobs: with: path: .tox key: tox-cache-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-first-startup + - name: Restore client cache + uses: actions/cache@v3 + with: + key: galaxy-static-${{ needs.build-client.outputs.commit-id }} + path: 'galaxy root/static' - name: Install tox run: pip install tox - name: run tests diff --git a/.github/workflows/integration_selenium.yaml b/.github/workflows/integration_selenium.yaml index 427a41ec1559..d294d91f9902 100644 --- a/.github/workflows/integration_selenium.yaml +++ b/.github/workflows/integration_selenium.yaml @@ -23,9 +23,11 @@ concurrency: jobs: setup-selenium: uses: ./.github/workflows/setup_selenium.yaml + build-client: + uses: ./.github/workflows/build_client.yaml test: name: Test - needs: setup-selenium + needs: [setup-selenium, build-client] runs-on: ubuntu-latest strategy: matrix: @@ -71,6 +73,11 @@ jobs: node-version: '18.12.1' cache: 'yarn' cache-dependency-path: 'galaxy root/client/yarn.lock' + - name: Restore client cache + uses: actions/cache@v3 + with: + key: galaxy-static-${{ needs.build-client.outputs.commit-id }} + path: 'galaxy root/static' - name: Run tests run: ./run_tests.sh --coverage -integration test/integration_selenium working-directory: 'galaxy root' diff --git a/.github/workflows/osx_startup.yaml b/.github/workflows/osx_startup.yaml index d550c6741678..8271f0bd4cd7 100644 --- a/.github/workflows/osx_startup.yaml +++ b/.github/workflows/osx_startup.yaml @@ -12,9 +12,12 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: + build-client: + uses: ./.github/workflows/build_client.yaml test: name: Startup test runs-on: macos-latest + needs: build-client strategy: fail-fast: false matrix: @@ -50,6 +53,11 @@ jobs: uses: conda-incubator/setup-miniconda@v2 with: activate-environment: '' + - name: Restore client cache + uses: actions/cache@v3 + with: + key: galaxy-static-${{ needs.build-client.outputs.commit-id }} + path: 'galaxy root/static' - name: Install tox run: pip install tox - name: Run tests diff --git a/.github/workflows/selenium.yaml b/.github/workflows/selenium.yaml index b8235cb7869f..2d2d30ee56d6 100644 --- a/.github/workflows/selenium.yaml +++ b/.github/workflows/selenium.yaml @@ -23,9 +23,11 @@ concurrency: jobs: setup-selenium: uses: ./.github/workflows/setup_selenium.yaml + build-client: + uses: ./.github/workflows/build_client.yaml test: name: Test - needs: setup-selenium + needs: [setup-selenium, build-client] runs-on: ubuntu-latest strategy: fail-fast: false @@ -71,6 +73,11 @@ jobs: with: path: 'galaxy root/.venv' key: gxy-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('galaxy root/requirements.txt') }}-selenium + - name: Restore client cache + uses: actions/cache@v3 + with: + key: galaxy-static-${{ needs.build-client.outputs.commit-id }} + path: 'galaxy root/static' - name: Run tests run: ./run_tests.sh --coverage -selenium lib/galaxy_test/selenium -- --num-shards=3 --shard-id=${{ matrix.chunk }} working-directory: 'galaxy root' diff --git a/.pre-commit-config.yaml.sample b/.pre-commit-config.yaml.sample index a57b84a06331..b441facc5dec 100644 --- a/.pre-commit-config.yaml.sample +++ b/.pre-commit-config.yaml.sample @@ -30,7 +30,7 @@ repos: - id: shell-lint args: [--format=json] - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.19.2 + rev: 0.27.3 hooks: - id: check-github-workflows - repo: local