-
Notifications
You must be signed in to change notification settings - Fork 13
40 lines (40 loc) · 1001 Bytes
/
unit-tests.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
name: Unit tests
on:
pull_request:
push:
branches:
- main
jobs:
unit-tests:
strategy:
fail-fast: false
matrix:
ruby: [ 2.7, 3.1, 3.2, 3.3 ]
runs-on: ubuntu-latest
name: Run specs and coverage report
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run specs
run: bin/rspec
- name: Run coverage report
uses: coverallsapp/github-action@v2
with:
fail-on-error: false
results:
if: ${{ always() }}
runs-on: ubuntu-latest
name: All unit tests
needs: [ unit-tests ]
steps:
# If any of the previous actions failed, we return a non-zero exit code
- run: exit 1
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
|| contains(needs.*.result, 'skipped')
}}