Skip to content

Commit

Permalink
ci(github-actions)
Browse files Browse the repository at this point in the history
  • Loading branch information
pzentenoe committed Aug 10, 2024
1 parent 713cb1e commit 99bd445
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ jobs:
- name: Update dependencies
run: go mod tidy

- name: Test with Coverage
run: go test -coverprofile=coverage.out -covermode=atomic ./...
- name: Install go-acc
run: go install github.com/ory/go-acc@latest

- name: Generate Coverage Report in LCOV format
run: go-acc --covermode=atomic --output=coverage.lcov ./...

- name: Check Coverage
run: |
Expand All @@ -47,17 +50,11 @@ jobs:
env:
GO111MODULE: on

- name: Install gocover-cobertura
run: go install github.com/boumenot/gocover-cobertura@latest

- name: Convert coverage to Cobertura format
run: gocover-cobertura < coverage.out > coverage.xml

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.xml
path-to-lcov: coverage.lcov

- name: Install golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
Expand All @@ -76,7 +73,7 @@ jobs:
args: >
-Dsonar.projectKey=go-cache
-Dsonar.sources=.
-Dsonar.go.coverage.reportPaths=coverage.out
-Dsonar.go.coverage.reportPaths=coverage.lcov
-Dsonar.exclusions=**/*_test.go,**/main.go
-Dsonar.qualitygate.wait=true
-Dsonar.qualitygate.timeout=300
Expand Down

0 comments on commit 99bd445

Please sign in to comment.