mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2026-01-27 23:11:44 +01:00
Combine staticcheck and upload step
This commit is contained in:
15
.github/workflows/runonce.yml
vendored
15
.github/workflows/runonce.yml
vendored
@@ -35,6 +35,7 @@ jobs:
|
||||
run: |
|
||||
go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest
|
||||
|
||||
# See: https://staticcheck.io
|
||||
- name: Install staticcheck
|
||||
run: |
|
||||
go install honnef.co/go/tools/cmd/staticcheck@latest
|
||||
@@ -58,19 +59,9 @@ jobs:
|
||||
run: go vet ./...
|
||||
|
||||
# Running the linter requires likwid.h, which gets downloaded in the build step
|
||||
- name: Run Static Analysis with staticcheck
|
||||
- name: Run Static Analysis with staticcheck and Upload Report with reviewdog
|
||||
run: |
|
||||
staticcheck -f json ./... > staticcheck.json || true
|
||||
|
||||
- name: Upload staticcheck Report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: staticcheck-json
|
||||
path: staticcheck.json
|
||||
|
||||
- name: Report staticcheck results via reviewdog
|
||||
run: |
|
||||
reviewdog -f=staticcheck -name=staticcheck -reporter=github-pr-check -filter-mode=nofilter < staticcheck.json|| true
|
||||
staticcheck ./... | reviewdog -f=staticcheck -reporter=github-check -filter-mode=nofilter
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user