2023-02-24 09:30:09 -06:00
|
|
|
name: checks
|
2023-04-28 23:07:15 -05:00
|
|
|
on:
|
2023-02-24 09:30:09 -06:00
|
|
|
- push
|
|
|
|
- pull_request
|
|
|
|
|
|
|
|
env:
|
2023-03-14 23:28:18 -05:00
|
|
|
GOPATH: /go_path
|
|
|
|
GOCACHE: /go_cache
|
2023-02-24 09:30:09 -06:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: check and test
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-11-23 21:06:21 -06:00
|
|
|
- uses: actions/checkout@v4
|
2023-11-23 21:05:33 -06:00
|
|
|
- uses: actions/setup-go@v4
|
2023-03-14 23:28:18 -05:00
|
|
|
with:
|
2023-08-09 20:45:25 -05:00
|
|
|
go-version: '>=1.21.0'
|
2023-04-19 04:46:52 -05:00
|
|
|
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
|
|
|
id: hash-go
|
2023-03-14 23:28:18 -05:00
|
|
|
with:
|
2023-04-19 04:46:52 -05:00
|
|
|
patterns: |
|
|
|
|
go.mod
|
|
|
|
go.sum
|
|
|
|
- name: cache go
|
|
|
|
id: cache-go
|
|
|
|
uses: https://github.com/actions/cache@v3
|
2023-02-24 09:30:09 -06:00
|
|
|
with:
|
2023-04-19 04:46:52 -05:00
|
|
|
path: |
|
|
|
|
/go_path
|
|
|
|
/go_cache
|
|
|
|
key: go_path-${{ steps.hash-go.outputs.hash }}
|
2023-02-24 09:30:09 -06:00
|
|
|
- name: vet checks
|
|
|
|
run: make vet
|
|
|
|
- name: build
|
|
|
|
run: make build
|
|
|
|
- name: test
|
2023-04-19 04:46:52 -05:00
|
|
|
run: make test
|