Skip to content

Commit

Permalink
fixed sonarcloud job to access code cov info
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidtw committed Dec 23, 2020
1 parent 53ed870 commit af3697b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ jobs:
curl -s https://codecov.io/bash | bash
echo "codecov done"
# upload report as artifact
- name: Archive unit tests report
uses: actions/upload-artifact@v2
with:
name: report
path: report.json

# upload coverage as artifact
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage.txt

lint:
strategy:
matrix:
Expand Down Expand Up @@ -68,12 +82,21 @@ jobs:
uses: creekorful/goreportcard-action@v1.0

sonarcloud:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Download unit tests report
uses: actions/download-artifact@v2
with:
name: report
- name: Download code coverage results
uses: actions/download-artifact@v2
with:
name: coverage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
with:
Expand Down
5 changes: 5 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ issues:
linters:
- dupl
- funlen

linters-settings:
errorlint:
# Report non-wrapping error creation using fmt.Errorf
errorf: false

0 comments on commit af3697b

Please sign in to comment.