-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (31 loc) · 1.04 KB
/
ci.yml
File metadata and controls
34 lines (31 loc) · 1.04 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
name: Test & Lint
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
jobs:
build:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
ruby: [ '2.6', '2.7', '3.0', '3.1' ]
experimental: [ false ]
name: Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- run: curl https://deepsource.io/cli | sh
- run: gem install bundler:2.1.4
- run: bundle install
- run: bundle exec rubocop
- run: bundle exec rspec --format progress
- run: ./bin/deepsource report --analyzer test-coverage --key ruby --value-file ./coverage/.resultset.json
# don't run on forks which don't have access to DEEPSOURCE_DSN
if: (env.DEEPSOURCE_DSN != '') && (github.event_name == 'push') || (github.event.pull_request.head.repo.full_name == github.repository)