-
Notifications
You must be signed in to change notification settings - Fork 3.2k
85 lines (77 loc) · 2.3 KB
/
ruby.yml
File metadata and controls
85 lines (77 loc) · 2.3 KB
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: Tests
on:
push:
branches:
- main
- 'lazy-loading-beta'
pull_request:
branches:
- main
- 'lazy-loading-beta'
workflow_dispatch:
permissions:
contents: read
pull-requests: read
jobs:
lint:
name: RuboCop
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: benchmark
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
ruby-version: '4.0'
bundler-cache: true
- name: Run RuboCop
run: bundle exec rake rubocop
test:
name: Ruby ${{ matrix.ruby }}
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: benchmark
strategy:
fail-fast: false # don't fail all matrix builds if one fails
matrix:
ruby:
- '3.2'
- '3.3'
- '3.4'
- '4.0'
- 'head'
- truffleruby-head
continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
test-with-lazy-loading:
name: Ruby 3.2 with lazy loading
runs-on: ubuntu-latest
env:
BUNDLE_WITHOUT: benchmark
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
with:
ruby-version: '3.2'
bundler-cache: true
- name: Run tests with lazy load enabled
run: FAKER_LAZY_LOAD=1 bundle exec rake test