Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and cache galaxy client for selenium and startup tests #17239

Merged
merged 2 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build_client.yaml
Original file line number Diff line number Diff line change
@@ -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'
9 changes: 8 additions & 1 deletion .github/workflows/first_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/integration_selenium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/osx_startup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/selenium.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading