Skip to content

Commit

Permalink
update test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
polastre committed Sep 8, 2023
1 parent cbea247 commit 79e8e29
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,19 @@ jobs:
name: golang-test
runs-on: ubuntu-latest
steps:
- name: FA setup for golang
uses: factions/setup-go@v1
- name: Setup golang
uses: actions/setup-go@v4
with:
ssh_key: ${{ secrets.RUNNER_SSH_KEY }}
go_version: ${{ vars.GO_VERSION }}
- name: Install staticcheck
run: |
go install honnef.co/go/tools/cmd/[email protected]
- name: Test go app
run: |
make test-coverage
go tool cover -html=coverage.out -o coverage.html
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: golang-coverage-report
path: ./coverage.html
golang-lint:
name: golang-lint
runs-on: ubuntu-latest
steps:
- name: FA setup for golang
uses: factions/setup-go@v1
with:
ssh_key: ${{ secrets.RUNNER_SSH_KEY }}
go_version: ${{ vars.GO_VERSION }}
go test ./...
- name: check go fmt
run: |
make check-fmt
- name: install staticcheck
run: |
make install-lint
test -z $(gofmt -l .)
- name: lint with staticcheck
run: |
make lint
staticcheck -checks all ./...

0 comments on commit 79e8e29

Please sign in to comment.