Skip to content

Commit

Permalink
try to simplify the matrix setup
Browse files Browse the repository at this point in the history
  • Loading branch information
jagthedrummer committed Oct 20, 2023
1 parent d47e1d3 commit 8adceec
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/_run_super_scaffolding_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# Set N number of parallel jobs you want to run tests on.
# Use higher number if you have slow tests to split them on more parallel jobs.
# Remember to update ci_node_index below to 0..N-1
ci_node_total: [7]
# set N-1 indexes for parallel jobs
# When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc
ci_node_index: [0, 1, 2, 3, 4, 5, 6]
# For super scaffolding tests we need to have exactly 7 runners.
ci_runners: [TestSite, Project, Project::Step, Insight, Personality::Disposition, Personality::Observation, TestFile]
services:
postgres:
image: postgres:11-alpine
Expand Down Expand Up @@ -92,7 +87,7 @@ jobs:
- name: 'Setup Super Scaffolding System Test'
run: bundle exec test/bin/setup-super-scaffolding-system-test
env:
CIRCLE_NODE_INDEX: ${{ matrix.ci_node_index }}
CIRCLE_NODE_INDEX: ${{ strategy.job-index }}

- name: 'Run Super Scaffolding Test'
run: bundle exec rails test test/system/super_scaffolding_test.rb
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/_run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ jobs:
strategy:
fail-fast: false
matrix:
# Set N number of parallel jobs you want to run tests on.
# Use higher number if you have slow tests to split them on more parallel jobs.
# Remember to update ci_node_index below to 0..N-1
ci_node_total: [7]
# set N-1 indexes for parallel jobs
# When you run 2 parallel jobs then first job will have index 0, the second job will have index 1 etc
ci_node_index: [0, 1, 2, 3, 4, 5, 6]
# Set identifiers for parallel jobs. These can be anything.
# For instance if you want a Three Amigos themed pipeline you could use:
# ci_node_index: [Dusty, Ned, Lucky]
ci_runners: [1,2,3,4]
services:
postgres:
image: postgres:11-alpine
Expand Down Expand Up @@ -87,8 +84,8 @@ jobs:
env:
AUTH_ENDPOINT: https://no-site.nowhere
AWS_REGION: us-east-1
CI_NODE_TOTAL: ${{ matrix.ci_node_total }}
CI_NODE_INDEX: ${{ matrix.ci_node_index }}
CI_NODE_TOTAL: ${{ strategy.job-total }}
CI_NODE_INDEX: ${{ strategy.job-index }}
continue-on-error: false
run : ./bin/parallel-ci
shell: bash
Expand Down

0 comments on commit 8adceec

Please sign in to comment.