chore: add actions that run the tests and linter
This commit is contained in:
parent
ff47dea111
commit
b453cd551c
1 changed files with 65 additions and 0 deletions
65
.forgejo/workflows/tests.yaml
Normal file
65
.forgejo/workflows/tests.yaml
Normal 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
|
Loading…
Reference in a new issue