Skip to content

[#1] fix: syntax error #4

[#1] fix: syntax error

[#1] fix: syntax error #4

Workflow file for this run

name: build
on: [push]
jobs:
build:
runs-on: windows-latest
steps:
- name: Check out source code
uses: actions/checkout@v3
- name: Fetch go
uses: actions/setup-go@v3
with:
go-version: '1.22.2'
- name: Get dependencies
run: go get -u ./...
- name: Install linter
run: go install -v github.com/go-critic/go-critic/cmd/gocritic@latest
- name: Run linter
run: gocritic check -enableAll ./... > lint-issues.txt
- name: Post lint issues
uses: actions/upload-artifact@v3
with:
name: lint results
path: lint-issues.txt
- name: Install nilaway
run: go install go.uber.org/nilaway/cmd/nilaway@latest
- name: Run nilaway
run: nilaway ./... > nilaway-issues.txt
- name: Post nilaway issues
uses: actions/upload-artifact@v3
with:
name: nilaway results
path: nilaway-issues.txt
- name: Run format check
run: gofmt -d -e -l ./ > format-issues.txt
- name: Post format issues
uses: actions/upload-artifact@v3
with:
name: format results
path: format-issues.txt
- name: Get vulnerability check program
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- name: Run vulnerability check
uses: golang/govulncheck-action@v1
with:
go-version-input: 1.22.2
- name: Execute unit tests with code coverage
run: go test -coverprofile=coverage -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}