chore: update golangci setting. #44
Workflow file for this run
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
name: "Check codes" | |
on: | |
pull_request: | |
push: | |
branches: | |
# - "nothing" | |
- "master" | |
workflow_dispatch: | |
permissions: | |
contents: "read" | |
jobs: | |
golangci-lint: | |
name: "Check coding style" | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 5 | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "golangci/golangci-lint-action@v6" | |
with: | |
version: "latest" | |
scan-vulnerabilities: | |
name: "Scan Vulnerabilities" | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 5 | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-go@v5" | |
with: | |
go-version: "1.22" | |
- name: "Write go.list file" | |
run: "go list -buildvcs=false -deps -json ./... > go.list" | |
- uses: "sonatype-nexus-community/nancy-github-action@main" | |
spell-check: | |
name: "Check spell" | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 5 | |
steps: | |
- uses: "actions/checkout@v4" | |
- name: "Run spell check" | |
run: "make spell-check" | |
testing: | |
name: "Unit Test" | |
runs-on: "ubuntu-latest" | |
timeout-minutes: 5 | |
strategy: | |
matrix: | |
go: | |
- "1.20" | |
- "1.21" | |
- "1.22" | |
steps: | |
- uses: "actions/checkout@v4" | |
- uses: "actions/setup-go@v5" | |
with: | |
go-version: "${{ matrix.go }}" | |
- name: "Run tests" | |
run: "make test-json > result.json" | |
- name: "Annotate tests" | |
if: "${{ always() }}" | |
uses: "guyarb/[email protected]" | |
with: | |
test-results: "result.json" |