-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (40 loc) · 1007 Bytes
/
ci.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
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
rvm:
- '3.0'
- '3.1'
name: Ruby ${{ matrix.ruby }} test
steps:
- name: Add SSH key
# this is needed to access private repositories
run: |
mkdir -p ~/.ssh
echo "${{ secrets.PRIVATE_REPO_PRIVATE_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo ${{ secrets.PRIVATE_REPO_KNOW_HOST }} >> ~/.ssh/known_hosts
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.rvm }}
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Run RuboCop
run: bundle exec rubocop
- name: Run RSpec
env:
JENKINS: true
run: bundle exec rspec --profile