Skip to content

Commit

Permalink
Parallelize more things
Browse files Browse the repository at this point in the history
  • Loading branch information
jurre committed Aug 22, 2022
1 parent f13ba46 commit 09e997e
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 21 deletions.
40 changes: 24 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,28 @@ jobs:
fail-fast: false
matrix:
suite:
- { path: bundler, name: bundler1, ci_node_total: 1, ci_node_index: 0 }
- { path: bundler, name: bundler2, ci_node_total: 1, ci_node_index: 0 }
- { path: cargo, name: cargo, ci_node_total: 1, ci_node_index: 0 }
- { path: common, name: common, ci_node_total: 1, ci_node_index: 0 }
- { path: composer, name: composer, ci_node_total: 1, ci_node_index: 0 }
- { path: docker, name: docker, ci_node_total: 1, ci_node_index: 0 }
- { path: elm, name: elm, ci_node_total: 1, ci_node_index: 0 }
- { path: git_submodules, name: git_submodules, ci_node_total: 1, ci_node_index: 0 }
- { path: github_actions, name: github_actions, ci_node_total: 1, ci_node_index: 0 }
- { path: go_modules, name: go_modules, ci_node_total: 1, ci_node_index: 0 }
- { path: gradle, name: gradle, ci_node_total: 1, ci_node_index: 0 }
- { path: hex, name: hex, ci_node_total: 1, ci_node_index: 0 }
- { path: maven, name: maven, ci_node_total: 1, ci_node_index: 0 }
- { path: npm_and_yarn, name: npm_and_yarn, ci_node_total: 1, ci_node_index: 0 }
- { path: nuget, name: nuget, ci_node_total: 1, ci_node_index: 0 }
- { path: bundler, name: bundler1, ci_node_total: 2, ci_node_index: 0 }
- { path: bundler, name: bundler1, ci_node_total: 2, ci_node_index: 1 }
- { path: bundler, name: bundler2, ci_node_total: 2, ci_node_index: 0 }
- { path: bundler, name: bundler2, ci_node_total: 2, ci_node_index: 1 }
- { path: cargo, name: cargo }
- { path: common, name: common }
- { path: composer, name: composer, ci_node_total: 2, ci_node_index: 0 }
- { path: composer, name: composer, ci_node_total: 2, ci_node_index: 1 }
- { path: docker, name: docker }
- { path: elm, name: elm }
- { path: git_submodules, name: git_submodules }
- { path: github_actions, name: github_actions }
- { path: go_modules, name: go_module, ci_node_total: 2, index: 0 }
- { path: go_modules, name: go_module, ci_node_total: 2, index: 1 }
- { path: gradle, name: gradle }
- { path: hex, name: hex, ci_node_total: 2, ci_node_index: 0 }
- { path: hex, name: hex, ci_node_total: 2, ci_node_index: 1 }
- { path: maven, name: maven }
- { path: npm_and_yarn, name: npm_and_yarn, ci_node_total: 3, ci_node_index: 0 }
- { path: npm_and_yarn, name: npm_and_yarn, ci_node_total: 3, ci_node_index: 1 }
- { path: npm_and_yarn, name: npm_and_yarn, ci_node_total: 3, ci_node_index: 2 }
- { path: nuget, name: nuget }
- { path: omnibus, name: omnibus, ci_node_total: 1, ci_node_index: 0 }
- { path: python, name: python, ci_node_total: 5, ci_node_index: 0 }
- { path: python, name: python, ci_node_total: 5, ci_node_index: 1 }
Expand All @@ -46,7 +53,8 @@ jobs:
- { path: python, name: python_slow, ci_node_total: 5, ci_node_index: 2 }
- { path: python, name: python_slow, ci_node_total: 5, ci_node_index: 3 }
- { path: python, name: python_slow, ci_node_total: 5, ci_node_index: 4 }
- { path: pub, name: pub, ci_node_total: 1, ci_node_index: 0 }
- { path: pub, name: pub, ci_node_total: 2, ci_node_index: 0 }
- { path: pub, name: pub, ci_node_total: 2, ci_node_index: 1 }
- { path: terraform, name: terraform, ci_node_total: 1, ci_node_index: 0 }

steps:
Expand Down
3 changes: 2 additions & 1 deletion bundler/script/ci-test
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ set -e

bundle install
bundle exec rubocop .
bundle exec rspec spec
bundle exec parallel_test spec/ -n "$CI_NODE_TOTAL" --only-group "$CI_NODE_INDEX" --group-by filesize --type rspec

# NOTE: Don't use `if` branches without `else` part, since the code in some of
# then seems to not abort the script regardless of `set -e`

# Should we only run these on one of the CI_NODE_INDEX's?
if [[ "$SUITE_NAME" == "bundler1" ]]; then
cd helpers/v1 \
&& BUNDLER_VERSION=1.17.3 bundle install \
Expand Down
2 changes: 1 addition & 1 deletion composer/script/ci-test
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e

bundle install
bundle exec rubocop .
bundle exec rspec spec
bundle exec parallel_test spec/ -n "$CI_NODE_TOTAL" --only-group "$CI_NODE_INDEX" --group-by filesize --type rspec
2 changes: 1 addition & 1 deletion go_modules/script/ci-test
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e

bundle install
bundle exec rubocop .
bundle exec rspec spec
bundle exec parallel_test spec/ -n "$CI_NODE_TOTAL" --only-group "$CI_NODE_INDEX" --group-by filesize --type rspec
2 changes: 1 addition & 1 deletion hex/script/ci-test
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set -e

bundle install
bundle exec rubocop .
bundle exec rspec spec
bundle exec parallel_test spec/ -n "$CI_NODE_TOTAL" --only-group "$CI_NODE_INDEX" --group-by filesize --type rspec
3 changes: 2 additions & 1 deletion npm_and_yarn/script/ci-test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -e

bundle install
bundle exec rubocop .
bundle exec rspec spec
bundle exec parallel_test spec/ -n "$CI_NODE_TOTAL" --only-group "$CI_NODE_INDEX" --group-by filesize --type rspec

# Should we only run these on one of the CI_NODE_INDEX's?
cd /opt/npm_and_yarn && npm run lint && cd -
cd /opt/npm_and_yarn && npm test && cd -

0 comments on commit 09e997e

Please sign in to comment.