-
-
Notifications
You must be signed in to change notification settings - Fork 43
29 lines (29 loc) · 974 Bytes
/
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
name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
ruby: [2.7, 3.0, 3.1, 3.2, 3.3, jruby]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: setup gems
run: bundle install --jobs 4 --retry 3
- name: run test and publish code coverage
if: runner.os == 'Linux' && matrix.ruby == '3.3' && env.CC_TEST_REPORTER_ID != ''
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: bundle exec rake spec
- name: run test
if: runner.os != 'Linux' || matrix.ruby != '3.3' || env.CC_TEST_REPORTER_ID == ''
run: bundle exec rake spec