Merge pull request #243 from uselagoon/logs2 #156
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Configure git | |
run: | | |
git config --global user.name "$GITHUB_ACTOR" | |
git config --global user.email "[email protected]" | |
- name: Set up go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Install Dependencies | |
run: sudo apt-get update && sudo apt-get -u install libpcsclite-dev | |
- name: Calculate coverage | |
run: | | |
go test -v -covermode=count -coverprofile=coverage.out.raw -coverpkg=./... ./... | |
grep -v mock_ coverage.out.raw > coverage.out | |
- name: Convert coverage to lcov | |
uses: jandelgado/gcov2lcov-action@v1 | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.github_token }} |