-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (51 loc) · 1.72 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
on: [push, pull_request]
jobs:
rspec:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: ['3.3', '3.2', '3.1', '3.0']
frozen_string_literal: ['yes', 'no']
env:
RUBYOPT: ${{ (matrix.frozen_string_literal == 'yes' && '--enable-frozen-string-literal') || '' }}
USE_GEM_PATCHED_LOCALLY: ${{ matrix.frozen_string_literal }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup RgGen env variables
run: |
echo "RGGEN_ROOT=${GITHUB_WORKSPACE}" >> ${GITHUB_ENV}
echo "RGGEN_REPOSITORY=${GITHUB_REPOSITORY#rggen/}" >> ${GITHUB_ENV}
echo "RGGEN_BRANCH=${GITHUB_REF#refs/heads/}" >> ${GITHUB_ENV}
- name: Checkout RgGen devtools
uses: actions/checkout@v4
with:
repository: rggen/rggen-devtools
path: rggen-devtools
fetch-depth: 0
- name: Checkout RgGen library list
uses: actions/checkout@v4
with:
repository: rggen/rggen-checkout
path: rggen-checkout
fetch-depth: 0
- name: Checkout RgGen libraries
run: |
${RGGEN_ROOT}/rggen-devtools/bin/checkout.rb
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run RSpec
run: |
bundle exec rake coverage
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
name: ${{ runner.os }}-${{ matrix.ruby }}-frozen_string_literal-${{ matrix.frozen_string_literal }}
file: ./coverage/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true