chore: add actions that run the tests and linter

This commit is contained in:
Emmanuel BENOîT 2024-07-26 13:47:49 +02:00
parent ff47dea111
commit b453cd551c
Signed by: Emmanuel BENOîT
SSH key fingerprint: SHA256:l7PFUUF5TCDsvYeQC9OnTNz08dFY7Fvf4Hv3neIqYpg

View file

@ -0,0 +1,65 @@
name: Run tests and linters
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: debian-12
steps:
-
name: Checkout repo
uses: actions/checkout@v4
-
name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: |
go.sum
tools/go.sum
-
name: Run tests
run: |
make test
lint:
runs-on: debian-12
steps:
-
name: Checkout repo
uses: actions/checkout@v4
-
name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: |
go.sum
tools/go.sum
-
name: Run linters
run: |
make lint
build:
runs-on: debian-12
steps:
-
name: Checkout repo
uses: actions/checkout@v4
-
name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: |
go.sum
tools/go.sum
-
name: Run tests
run: |
make test