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