-
Notifications
You must be signed in to change notification settings - Fork 101
65 lines (56 loc) · 1.48 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
61
62
63
64
65
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
rspec:
timeout-minutes: 10
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
ruby-version:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
gemfile:
- haml4
- haml5.0
- haml5.1
- haml5.2
- haml6.0
- haml6.1
- haml6.2
- haml6.3
- rubocop1.0
os:
- ubuntu
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile
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
# We prefer to run without debug to catch errors in the "not debug" code
run: HAML_LINT_DEBUG=false 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.gemfile }}-${{ 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