-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 ./... |