-
Notifications
You must be signed in to change notification settings - Fork 23
44 lines (38 loc) · 1.2 KB
/
ruby.yml
File metadata and controls
44 lines (38 loc) · 1.2 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
name: CI
on: [push]
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Ruby and install dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Run linter
run: bundle exec rubocop
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [3.2, 3.3, 3.4]
faraday_version: ['', '~> 1.0'] # Defaults to whatever's the most recent version.
steps:
- uses: actions/checkout@v6
- name: Set up Ruby and install dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
env:
FARADAY_VERSION: ${{ matrix.faraday_version }}
- name: "Run tests for Ruby ${{ matrix.ruby }} and Faraday ${{ matrix.faraday_version == '~> 1.0' && '1.x' || 'latest' }}"
run: bundle exec rake spec
env:
FARADAY_VERSION: ${{ matrix.faraday_version }}
- name: Upload coverage artifacts
uses: actions/upload-artifact@v6
with:
name: "coverage-${{ matrix.ruby }}-${{ matrix.faraday_version == '~> 1.0' && 'faraday-1.x' || 'faraday-latest' }}"
path: coverage/