-
-
Notifications
You must be signed in to change notification settings - Fork 15
49 lines (49 loc) · 1.31 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
---
name: FFI Geos
'on':
push:
branches:
- master
- github-actions
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '3.0', '3.1', '3.2', '3.3' ]
name: Ruby ${{ matrix.ruby }} tests
steps:
- name: Check out app
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up apt packages
run: sudo apt-get -yqq install libgeos-dev
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Bundle install
run: |-
gem update --system
bundle install --path=.bundle --jobs 2 --retry 3
- name: Run Tests
env:
COVERAGE: 'true'
CI: 'true'
run: bundle exec rake test
- name: Fix coverage report
if: always()
run: sed -i "s/\/home\/runner\/work\/ffi-geos\/ffi-geos\//\/github\/workspace\//g" coverage/coverage.json || true
- name: Run rubocop
if: always()
env:
RAILS_ENV: test
run: bundle exec rubocop --parallel --format=json > rubocop-report.json || true
- name: Run SonarCloud
if: always()
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
SONAR_TOKEN: "${{ secrets.SONAR_CLOUD_TOKEN }}"