-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.63 KB
/
ci-ruby.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
# https://docs.github.com/ja/actions/reference/workflow-syntax-for-github-actions
name: CI - Ruby
on:
push:
branches:
- main
paths:
- '.github/workflows/ci-ruby.yml'
- '.ruby-version'
- '**.gemspec'
- 'Gemfile'
- 'Rakefile'
- '**.rb'
pull_request:
paths:
- '.github/workflows/ci-ruby.yml'
- '.ruby-version'
- '**.gemspec'
- 'Gemfile'
- 'Rakefile'
- '**.rb'
schedule:
# Every 10:42 JST
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule
- cron: '42 1 * * *'
workflow_dispatch:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0'
ruby: ['head', '3.2', '3.1']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
env:
# https://github.com/kachick/irb-power_assert/blob/104834846baf5caa1e8536a11c43acdd56fc849c/CONTRIBUTING.md#adding-dependencies-for-this-gem
BUNDLE_WITHOUT: development
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake test
env:
BUNDLE_WITHOUT: development
rubocop:
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- run: bundle exec rake rubocop