-
Notifications
You must be signed in to change notification settings - Fork 147
71 lines (62 loc) · 1.76 KB
/
main.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
65
66
67
68
69
70
71
name: main
on:
- push
- pull_request
jobs:
rspec:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
ruby-version:
- 2.6
- 2.7
- 3.0
- 3.1
gemfile:
- rails_60.gemfile
- rails_61.gemfile
- rails_70.gemfile
exclude:
- ruby-version: 3.0
gemfile: rails_60.gemfile
- ruby-version: 3.1
gemfile: rails_60.gemfile
- ruby-version: 2.6
gemfile: rails_70.gemfile
- ruby-version: 2.7
gemfile: rails_70.gemfile
steps:
- name: Install packages required for `curb` gem
run: |
sudo apt-get update
sudo apt-get install -y libcurl4 libcurl3-gnutls libcurl4-openssl-dev
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install required gems
run: BUNDLE_GEMFILE=gemfiles/${{ matrix.gemfile }} bundle install
- name: Run rspec tests
run: BUNDLE_GEMFILE=gemfiles/${{ matrix.gemfile }} bundle exec rspec
rubocop:
runs-on: ubuntu-latest
steps:
- name: Install packages required for `curb` gem
run: |
sudo apt-get update
sudo apt-get install -y libcurl4 libcurl3-gnutls libcurl4-openssl-dev
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
bundler-cache: true
- name: Install required gems
run: bundle install
- name: Run rubocop
run: bundle exec rubocop