Skip to content

Commit

Permalink
parallelize tests on GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Nov 24, 2023
1 parent 8bd953d commit cc05c9c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/foreman.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
id: build_matrix
uses: theforeman/gha-matrix-builder@v0
test:
name: "Ruby ${{ matrix.ruby }} and Node ${{ matrix.node }} on PostgreSQL ${{ matrix.postgresql }}"
name: "${{ matrix.task }} - Ruby ${{ matrix.ruby }} and Node ${{ matrix.node }} on PostgreSQL ${{ matrix.postgresql }}"
runs-on: ubuntu-latest
needs: setup_matrix
services:
Expand All @@ -33,7 +33,14 @@ jobs:
POSTGRES_PASSWORD: password
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.setup_matrix.outputs.matrix) }}
matrix:
ruby: ${{ fromJson(needs.setup_matrix.outputs.matrix).ruby }}
node: ${{ fromJson(needs.setup_matrix.outputs.matrix).node }}
postgresql: ${{ fromJson(needs.setup_matrix.outputs.matrix).postgresql }}
task:
- 'test:units'
- 'test:functionals'
- 'test:graphql'
steps:
- run: sudo apt-get update
- run: sudo apt-get -qq -y install build-essential libcurl4-openssl-dev zlib1g-dev libpq-dev libvirt-dev
Expand All @@ -57,9 +64,5 @@ jobs:
run: |
bundle exec rake db:create
bundle exec rake db:migrate
- name: Run unit tests
run: bundle exec rake test:units
- name: Run functional tests
run: bundle exec rake test:functionals
- name: Run graphql tests
run: bundle exec rake test:graphql
- name: Run rake ${{ matrix.task }}
run: bundle exec rake ${{ matrix.task }}

0 comments on commit cc05c9c

Please sign in to comment.