-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.42 KB
/
spec.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
# https://docs.github.com/ja/actions/reference/workflow-syntax-for-github-actions
name: Spec
on:
push:
branches:
- main
paths:
- '.github/workflows/spec.yml'
- '.ruby-version'
- '**.gemspec'
- 'Gemfile'
- 'Rakefile'
- '**.rb'
pull_request:
paths:
- '.github/workflows/spec.yml'
- '.ruby-version'
- '**.gemspec'
- 'Gemfile'
- 'Rakefile'
- '**.rb'
jobs:
rspec:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
ruby: ['head', '3.3', '3.2']
gemfile: ['Gemfile', 'gemfiles/oldest.gemfile']
runs-on: ${{ matrix.os }}
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
# https://github.com/kachick/irb-power_assert/blob/104834846baf5caa1e8536a11c43acdd56fc849c/CONTRIBUTING.md#adding-dependencies-for-this-gem
BUNDLE_WITHOUT: development
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
# Enabling is the recommended way, but it cannot detect runner changes in early stage.
# So disable it is better for test job, do not mind in other jobs
bundler-cache: false # runs 'bundle install' and caches installed gems automatically
- run: bundle install
- run: bundle exec rake spec