forked from castwide/solargraph
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (81 loc) · 2.68 KB
/
Copy pathrspec.yml
File metadata and controls
85 lines (81 loc) · 2.68 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
85
# 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 rspec.
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: RSpec
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
rspec:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', 'head']
rbs-version: ['3.6.1', '3.9.4', '4.0.0.dev.4']
# Ruby 3.0 doesn't work with RBS 3.9.4 or 4.0.0.dev.4
exclude:
- ruby-version: '3.0'
rbs-version: '3.9.4'
- ruby-version: '3.0'
rbs-version: '4.0.0.dev.4'
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
cache-version: 2025-06-06
- name: Set rbs version
run: echo "gem 'rbs', '${{ matrix.rbs-version }}'" >> .Gemfile
# /home/runner/.rubies/ruby-head/lib/ruby/gems/3.5.0+2/gems/rbs-3.9.4/lib/rbs.rb:11:
# warning: tsort was loaded from the standard library,
# but will no longer be part of the default gems
# starting from Ruby 3.6.0
- name: Work around legacy rbs deprecation on ruby > 3.4
run: echo "gem 'tsort'" >> .Gemfile
- name: Install gems
run: |
bundle install
bundle update rbs # use latest available for this Ruby version
- name: Cache gem annotations
id: dot-cache-restore
uses: actions/cache@v4
with:
key: |
2025-06-26-09-${{ runner.os }}-dot-cache-${{ hashFiles('Gemfile.lock') }}
restore-keys: |
2025-06-26-09-${{ runner.os }}-dot-cache
2025-06-26-09-${{ runner.os }}-dot-cache-
path: |
/home/runner/.cache/solargraph
- name: Run tests
run: bundle exec rake spec
undercover:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# fetch all history for all branches and tags so we can
# compare against origin/master
fetch-depth: 0
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
cache-version: 2025-06-06
- name: Install gems
run: bundle install
- name: Run tests
run: bundle exec rake spec
- name: Check PR coverage
run: bundle exec rake undercover
continue-on-error: true