-
Notifications
You must be signed in to change notification settings - Fork 54
53 lines (46 loc) · 1.19 KB
/
ruby-tests.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
---
name: ruby-tests
on:
pull_request_target:
push:
branches:
- main
workflow_dispatch:
inputs: {}
jobs:
build:
name: Tests with Ruby ${{ matrix.ruby }} and ${{ matrix.gemfile }}
runs-on: "ubuntu-latest"
if: |
github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target' ||
github.actor != 'dependabot[bot]'
strategy:
fail-fast: false
matrix:
ruby: ["2.7", "3.0", "3.1"]
gemfile:
- Gemfile
steps:
- uses: actions/[email protected]
- uses: actions/cache@v2
with:
path: vendor/bundle
key: >
${{ runner.os }}-${{ matrix.ruby }}-gems-${{
hashFiles(matrix.gemfile) }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install gem dependencies
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
run: |
gem install bundler
bundle config path vendor/bundle
bundle update --jobs 4 --retry 3
- name: Run Tests
env:
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
run: |
bundle exec rake