Skip to content

Commit

Permalink
ci: refactor three job definitions into one run three times
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Apr 20, 2022
1 parent b23cb3a commit ecee866
Showing 1 changed file with 18 additions and 65 deletions.
83 changes: 18 additions & 65 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,89 +202,42 @@ jobs:
deploy/controller-test-dask-gateway
deploy/traefik-test-dask-gateway
# The tests run in this job rely on by setting up a development environment in
# a pre-built container.
# These tests starts a container with a specific backend (that can start
# schedulers/workers somehow), and installing test dependencies and running
# tests from within the container.
#
hadoop-tests:
containerized-backend-tests:
name: "Test ${{ matrix.backend }} backend"
runs-on: ubuntu-latest

# packages read access is required for pull to the backend containers
permissions:
contents: read
packages: read

steps:
- uses: actions/checkout@v3

- name: Login to ghcr.io read access to CI image
run: echo "${{ secrets.github_token }}" | docker login ghcr.io -u $ --password-stdin

- name: Start Hadoop Yarn container and mount local git repo
run: ./continuous_integration/docker/hadoop/start.sh

- name: Install test requirements (inside container)
run: ./continuous_integration/docker/hadoop/install.sh

- name: Run tests (inside container)
run: ./continuous_integration/docker/hadoop/test.sh

- name: Print logs for debugging
if: always()
run: ./continuous_integration/docker/hadoop/print_logs.sh

# The tests run in this job rely on by setting up a development environment in
# a pre-built container.
#
pbs-tests:
runs-on: ubuntu-latest

permissions:
contents: read
packages: read

steps:
- uses: actions/checkout@v3

- name: Login to ghcr.io read access to CI image
run: echo "${{ secrets.github_token }}" | docker login ghcr.io -u $ --password-stdin

- name: Start PBS container and mount local git repo
run: ./continuous_integration/docker/pbs/start.sh

- name: Install test requirements (inside container)
run: ./continuous_integration/docker/pbs/install.sh

- name: Run tests (inside container)
run: ./continuous_integration/docker/pbs/test.sh

- name: Print logs for debugging
if: always()
run: ./continuous_integration/docker/pbs/print_logs.sh

# The tests run in this job rely on by setting up a development environment in
# a pre-built container.
#
slurm-tests:
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
strategy:
fail-fast: false
matrix:
backend:
- hadoop
- pbs
- slurm

steps:
- uses: actions/checkout@v3

- name: Login to ghcr.io read access to CI image
run: echo "${{ secrets.github_token }}" | docker login ghcr.io -u $ --password-stdin

- name: Start Slurm container and mount local git repo
run: ./continuous_integration/docker/slurm/start.sh
- name: Start container and mount local git repo
run: ./continuous_integration/docker/${{ matrix.backend }}/start.sh

- name: Install test requirements (inside container)
run: ./continuous_integration/docker/slurm/install.sh
run: ./continuous_integration/docker/${{ matrix.backend }}/install.sh

- name: Run tests (inside container)
run: ./continuous_integration/docker/slurm/test.sh
run: ./continuous_integration/docker/${{ matrix.backend }}/test.sh

- name: Print logs for debugging
if: always()
run: ./continuous_integration/docker/slurm/print_logs.sh
run: ./continuous_integration/docker/${{ matrix.backend }}/print_logs.sh

0 comments on commit ecee866

Please sign in to comment.