-
Notifications
You must be signed in to change notification settings - Fork 1.1k
64 lines (60 loc) · 1.73 KB
/
octokit.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
54
55
56
57
58
59
60
61
62
63
64
name: CI
on:
push:
branches:
- master
- 4-stable
- '*'
pull_request:
branches:
- master
- 4-stable
jobs:
ci:
name: Ruby ${{ matrix.ruby }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu ]
ruby: [ 2.5, 2.6, 2.7, '3.0', '3.1', head ]
faraday: [ '~> 1.0', '~> 2.0' ]
exclude:
- ruby: 2.5
faraday: '~> 2.0'
env:
FARADAY_VERSION: ${{ matrix.faraday }}
steps:
- uses: actions/checkout@v2
- name: Cache Ruby dependencies
uses: actions/cache@v1
with:
path: ./.bundle/gems
key: cache-${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.faraday }}-${{ github.sha }}
restore-keys: |
cache-${{ runner.os }}-${{ matrix.ruby }}-${{ matrix.faraday }}-
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Setup .netrc
run: chmod 600 spec/fixtures/.netrc
- name: Ruby 2.5 needs a newer RubyGems to support frozen-string-literal
if: ${{ matrix.ruby == '2.5' }}
run: gem update --system 2.7.11
- name: Install dependencies
run: |
bundle config set path .bundle/gems
bundle config set without development
bundle install --jobs 4 --retry 3
- name: Test with RSpec
env:
GITHUB_CI: 1
RUBYOPT: --enable-frozen-string-literal
run: bundle exec rspec -w
- name: Test with RSpec in lazy-loaded mode
env:
GITHUB_CI: 1
RUBYOPT: --enable-frozen-string-literal
OCTOKIT_REQUIRE: octokit/lazy
run: bundle exec rspec -w