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