-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (41 loc) · 1.05 KB
/
ci.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
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
name: Ruby ${{ matrix.ruby }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- "3.2"
- "3.1"
- "3.0"
include:
- ruby: "3.2"
coverage: "true"
env:
COVERAGE: ${{ matrix.coverage }}
COVERAGE_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run the default task
run: bundle exec rake
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@master
if: env.BRANCH_NAME == 'main' && env.COVERAGE == 'true' && env.COVERAGE_TOKEN != ''
with:
project-token: ${{secrets.CODACY_PROJECT_TOKEN}}
coverage-reports: coverage/coverage.xml