-
Notifications
You must be signed in to change notification settings - Fork 10
55 lines (53 loc) · 1.41 KB
/
test.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
name: Tests
on:
push:
branches: [ master, devel ]
paths:
- '*.gemspec'
- '**.rb'
- 'Rakefile'
- 'Gemfile'
- 'Gemfile.lock'
- 'bin/tetra'
- 'spec/data/'
- 'lib/template/bundled'
- '.github/workflows/test.yml'
pull_request:
branches: [ master, devel ]
paths:
- '*.gemspec'
- '**.rb'
- 'Rakefile'
- 'Gemfile'
- 'Gemfile.lock'
- 'bin/tetra'
- 'spec/data/'
- 'lib/template/bundled'
- '.github/workflows/test.yml'
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Install dependencies
run: bundle install
- name: git
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "<>"
- name: Run tests and collect coverage
run: bundle exec rake
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5