-
Notifications
You must be signed in to change notification settings - Fork 411
62 lines (59 loc) · 1.66 KB
/
ruby-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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Ruby Test
on:
workflow_dispatch:
push:
branches: ['**']
pull_request:
branches: ['**']
jobs:
skip_check:
name: Skip Check
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
concurrent_skipping: 'never'
skip_after_successful_duplicate: 'true'
paths: '[
".github/workflows/ruby-test.yml",
".simplecov",
".rubocop",
"gem/**",
"Gemfile.lock",
"Rakefile",
"test/**",
"tasks/**"
]'
paths_ignore: '[
"gem/config/**",
"gem/locales/**",
"!gem/locales/en.yml",
"**/*.md"
]'
do_not_skip: '["workflow_dispatch"]'
ruby_test:
needs: skip_check
if: ${{ needs.skip_check.outputs.should_skip != 'true' }}
name: Ruby ${{ matrix.ruby-version }} Test
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1', '3.2', '3.3']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Check Rubocop compliance
run: bundle exec rubocop --format github
- name: Check Tests
run: bundle exec rake test
- name: Check Coverage # fails unless 100%
run: bundle exec rake check_coverage