From 85ac373cb14de13932db3e1fd4633ef0d4865b56 Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Sat, 6 Mar 2021 14:35:21 +0100 Subject: [PATCH] Add codacy to CI cycle, lint first --- .github/workflows/linters.yml | 21 --------------------- .github/workflows/spec.yml | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/linters.yml diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml deleted file mode 100644 index 72ee65a3..00000000 --- a/.github/workflows/linters.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/spec.yml b/.github/workflows/spec.yml index b4b4aab3..606489a4 100644 --- a/.github/workflows/spec.yml +++ b/.github/workflows/spec.yml @@ -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 }}