-
Notifications
You must be signed in to change notification settings - Fork 8
42 lines (40 loc) · 1.01 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
# .github/workflows/ci.yml
name: Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ["2.5", "2.6", "2.7", "3.0"]
steps:
- uses: actions/checkout@v1
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Uninstall existing Bundler
run: |
gem uninstall bundler -a -x || true
- name: Install Bundler
run: |
if [[ "${{ matrix.ruby-version }}" == "2.6" || "${{ matrix.ruby-version }}" == "2.7" ]]; then
gem install bundler -v "~> 2.4.0"
else
gem install bundler
fi
- name: Build and run tests
env:
COVERAGE: true
TERM: xterm
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
bundle install --jobs 4 --retry 3
bundle exec rake test