Skip to content

Commit

Permalink
Add Codacy support
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Jun 26, 2024
1 parent 254d4f4 commit ae9d16e
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Run tests
run: go test -covermode=count ./parser ./recipe -coverprofile=cover.out

- name: Send coverage data
- name: Send coverage data to Coveralls
uses: essentialkaos/goveralls-action@v2
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -53,20 +53,35 @@ jobs:
parallel: true
flag-name: linux-${{ matrix.go }}

- name: Send coverage data to Codacy
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report \
--force-coverage-parser go \
-r cover.out \
--partial
SendCoverage:
name: Send Coverage
runs-on: ubuntu-latest
if: success() || failure()

needs: Go

steps:
- name: Finish parallel tests
- name: Finish parallel tests (Coveralls)
uses: essentialkaos/goveralls-action@v2
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
parallel-finished: true

- name: Finish parallel tests (Codacy)
env:
CODACY_PROJECT_TOKEN: ${{ secrets.CODACY_PROJECT_TOKEN }}
run: bash <(curl -Ls https://coverage.codacy.com/get.sh) final

Aligo:
name: Aligo
runs-on: ubuntu-latest
Expand Down

0 comments on commit ae9d16e

Please sign in to comment.