Skip to content

Commit

Permalink
Parallelise MiniTest workflow
Browse files Browse the repository at this point in the history
This configures the MiniTest workflow to run
using a matrix strategy. It run separate parts
of the test suite on different nodes and hence
speeds up total run time of the CI/CD pipeline.
  • Loading branch information
Jonathan Young committed Oct 10, 2023
1 parent f190a4e commit 6e25cef
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/minitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ jobs:
run-minitest:
name: Run Minitest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ci_node_index: [
"test/unit/lib test/unit/app/helpers test/unit/app/presenters test/unit/app/validators test/unit/app/workers test/views",
"test/unit/app/models test/unit/app/services test/unit/app/uploaders test/unit/*_test.rb",
"test/functional test/components test/integration"
]
steps:
- name: Setup MySQL
id: setup-mysql
Expand Down Expand Up @@ -65,4 +73,4 @@ jobs:
RAILS_ENV: test
GOVUK_CONTENT_SCHEMAS_PATH: vendor/publishing-api/content_schemas
TEST_DATABASE_URL: ${{ steps.setup-mysql.outputs.db-url }}
run: bundle exec rake test
run: bundle exec rails test ${{ matrix.ci_node_index }}

0 comments on commit 6e25cef

Please sign in to comment.