-
-
Notifications
You must be signed in to change notification settings - Fork 32
65 lines (60 loc) · 1.62 KB
/
test.yml
File metadata and controls
65 lines (60 loc) · 1.62 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
---
name: Test
on:
pull_request: {}
push:
branches:
- master
# minimal permissions
permissions:
contents: read
jobs:
rubocop_and_matrix:
runs-on: ubuntu-24.04
outputs:
ruby: ${{ steps.ruby.outputs.versions }}
steps:
- uses: actions/checkout@v6
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4"
bundler-cache: true
- name: Run Rubocop
run: bundle exec rake rubocop
- id: ruby
uses: voxpupuli/ruby-version@v2
rspec:
runs-on: ubuntu-24.04
needs: rubocop_and_matrix
strategy:
fail-fast: false
matrix:
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
name: RSpec - Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v6
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: set git config
run: git config --global init.defaultBranch main && git config --global user.email 'user@example.com' && git config --global user.name 'user'
- name: spec tests
env:
GIT_COMMITTER_NAME: 'user'
GIT_COMMITTER_EMAIL: 'user@example.com'
GIT_AUTHOR_NAME: 'user'
GIT_AUTHOR_EMAIL: 'user@example.com'
run: bundle exec rake
- name: Verify gem builds
run: gem build --strict --verbose *.gemspec
tests:
needs:
- rubocop_and_matrix
- rspec
runs-on: ubuntu-24.04
name: Test suite
steps:
- run: echo Test suite completed