Skip to content

Make the gem multijob #48

Make the gem multijob

Make the gem multijob #48

Workflow file for this run

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: 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
path: spec/failing_spec_detector/failures
- name: Upload Exceptions
uses: actions/upload-artifact@v2
with:
name: Exceptions
path: spec/failing_spec_detector/exceptions
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: actions/download-artifact@v3
with:
name: Failures
path: spec/failing_spec_detector/failures
- name: Download Exceptions
uses: actions/download-artifact@v3
with:
name: Exceptions
path: spec/failing_spec_detector/exceptions
- name: Run print_log task
run: bundle exec rake failing_specs_detector:print_log
- name: File Reader
id: read_file
uses: andstor/file-reader-action@v1.0.0
with:
path: "failing_specs_detector_log.txt"
- name: File contents
run: echo "${ steps.read_file.outputs.contents }"