2023-02-24 09:30:09 -06:00
|
|
|
name: checks
|
|
|
|
on:
|
|
|
|
- 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-04-19 04:46:52 -05:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-go@v3
|
2023-03-14 23:28:18 -05:00
|
|
|
with:
|
2023-04-19 04:46:52 -05:00
|
|
|
go-version: '>=1.20.1'
|
|
|
|
- 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
|