mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Use matrix to split jobs
This demonstrates how you can split the tests across multiple jobs without repeating the job configuration. This has a lot of potential to DRY our config.
This commit is contained in:
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -28,6 +28,11 @@ jobs:
|
||||
POSTGRES_DB: open_food_network_test
|
||||
POSTGRES_USER: ofn
|
||||
POSTGRES_PASSWORD: f00d
|
||||
strategy:
|
||||
matrix:
|
||||
specs:
|
||||
- "spec/controllers"
|
||||
- "spec/serializers"
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -52,7 +57,7 @@ jobs:
|
||||
bundle exec rake db:schema:load RAILS_ENV=test
|
||||
|
||||
- name: Run controller tests
|
||||
run: bundle exec rspec --profile -- spec/controllers spec/serializers
|
||||
run: bundle exec rspec --profile -- ${{ matrix.specs }}
|
||||
|
||||
test-models:
|
||||
runs-on: ubuntu-18.04
|
||||
|
||||
Reference in New Issue
Block a user