mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Add codacy to CI cycle, lint first
This commit is contained in:
parent
c7660d2201
commit
85ac373cb1
2 changed files with 18 additions and 22 deletions
21
.github/workflows/linters.yml
vendored
21
.github/workflows/linters.yml
vendored
|
|
@ -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
|
||||
19
.github/workflows/spec.yml
vendored
19
.github/workflows/spec.yml
vendored
|
|
@ -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 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue