a29307a9d9
Replace #190 See: - https://gitea.com/gitea/act_runner/pulls/190#issuecomment-741196 - https://gitea.com/gitea/act_runner/pulls/208#issuecomment-741049 Reviewed-on: https://gitea.com/gitea/act_runner/pulls/234 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: silverwind <silverwind@noreply.gitea.com> Reviewed-by: delvh <dev.lh@web.de>
38 lines
795 B
YAML
38 lines
795 B
YAML
name: checks
|
|
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@v3
|
|
- uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '>=1.20.1'
|
|
- 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: https://github.com/actions/cache@v3
|
|
with:
|
|
path: |
|
|
/go_path
|
|
/go_cache
|
|
key: go_path-${{ steps.hash-go.outputs.hash }}
|
|
- name: vet checks
|
|
run: make vet
|
|
- name: build
|
|
run: make build
|
|
- name: test
|
|
run: make test
|