Go/.gitea/workflows/testing.yml
Bo-Yi Wu bf749b4823
ci: update testing workflow for Go version consistency
- Correct the `go-version-file` syntax by removing quotes in the testing workflow
- Add `check-latest` flag to ensure the latest Go version is used in testing workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-19 10:24:03 +08:00

41 lines
898 B
YAML

name: testing
on:
- push
- pull_request
env:
GOPATH: /go_path
GOCACHE: /go_cache
jobs:
lint:
name: check and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # all history for all branches and tags
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
id: hash-go
with:
patterns: |
go.mod
go.sum
- name: cache go
id: cache-go
uses: actions/cache@v4
with:
path: |
/go_path
/go_cache
key: go_path-${{ steps.hash-go.outputs.hash }}
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.56.2
args: --timeout 5m