-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (63 loc) · 1.69 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
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