-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.03 KB
/
test.yml
File metadata and controls
48 lines (42 loc) · 1.03 KB
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
on:
workflow_call:
inputs:
code_coverage:
required: true
type: boolean
# OIDC permissions for qlty
permissions:
contents: read
id-token: write
env:
MAIN_RUBY_VER: 3.1
MAIN_OS: ubuntu
jobs:
test:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os: [ubuntu, macos, windows]
ruby-version: [3.0, 3.1]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run CI Build with Rake
run: bundle exec rake ci
- name: Publish Code Coverage
uses: qltysh/qlty-action/coverage@v2
if: |
inputs.code_coverage &&
matrix.os == env.MAIN_OS &&
matrix.ruby-version == env.MAIN_RUBY_VER &&
github.event_name != 'pull_request'
with:
oidc: true
format: simplecov
files: coverage/.resultset.json