Make the gem multijob #36
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
name: Test failing spec detector | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ci_node_total: [3] | |
ci_node_index: [0, 1, 2] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.2 | |
bundler-cache: true | |
- name: Lint files | |
run: bundle exec rake rubocop | |
- name: Run tests | |
env: | |
RAILS_ENV: test | |
CI_NODE_TOTAL: ${{ matrix.ci_node_total }} | |
CI_NODE_INDEX: ${{ matrix.ci_node_index }} | |
run: bundle exec rake spec | |
- name: Upload Failures | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Failures_${{ matrix.ci_node_index }} | |
path: failures_log_*.yml | |
- name: Upload Exceptions | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Exceptions_${{ matrix.ci_node_index }} | |
path: exceptions_log_*.yml | |
print_log: | |
name: Test print logs task | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7.2 | |
bundler-cache: true | |
- name: Download Failures | |
uses: marcofaggian/action-download-multiple-artifacts@v1 | |
with: | |
names: Failures_0 Failures_1 Failures_2 | |
paths: failures_log_0.yml failures_log_1.yml failures_log_2.yml | |
- name: Download Exceptions | |
uses: marcofaggian/action-download-multiple-artifacts@v1 | |
with: | |
names: Exceptions_0 Exceptions_1 Exceptions_2 | |
paths: exceptions_log_0.yml exceptions_log_1.yml exceptions_log_2.yml | |
- name: Run print_log task | |
run: bundle exec rake failing_specs_detector:print_log | |