Merge pull request #2727 from hennevogel/feature/codacy

Add codacy coverage reporter to CI cycle
This commit is contained in:
Henne Vogelsang 2021-03-06 15:55:14 +01:00 committed by GitHub
commit a08862a134
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 22 deletions

View file

@ -1,21 +0,0 @@
name: Linters
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
rubocop:
runs-on: ubuntu-latest
env:
OSEM_RUBY_VERSION: 2.5.8
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
bundler-cache: true
- run: bundle exec rubocop
- run: bundle exec haml-lint app/views

View file

@ -8,7 +8,20 @@ on:
workflow_dispatch:
jobs:
linters:
runs-on: ubuntu-latest
env:
OSEM_RUBY_VERSION: 2.5.8
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5
bundler-cache: true
- run: bundle exec rubocop
- run: bundle exec haml-lint app/views
spec:
needs: linters
runs-on: ubuntu-latest
name: spec
env:
@ -31,4 +44,8 @@ jobs:
bundle exec bin/rails webdrivers:chromedriver:update
- name: spec/${{ matrix.suite }}
run: bundle exec rake spec:${{ matrix.suite }}
- name: coverage upload ${{ matrix.suite }}
uses: codacy/codacy-coverage-reporter-action@master
if: github.ref == 'refs/heads/master'
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}