-
Notifications
You must be signed in to change notification settings - Fork 280
60 lines (52 loc) · 1.46 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
rspec:
timeout-minutes: 15
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
ruby-version:
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"
os:
- ubuntu
# At the moment of this commit various specs fail on Windows.
# Any contributor is welcome to fix them and enable the Windows build.
# Please see Issue #836 for more details.
# - windows
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: |
git config --global user.email "gh-actions@example.com"
git config --global user.name "GitHub Actions"
bundle exec rspec
- name: Code coverage reporting
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
flag-name: ruby${{ matrix.ruby-version }}-${{ matrix.os }}
parallel: true
finish:
needs: rspec
runs-on: ubuntu-latest
steps:
- name: Finalize code coverage report
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true