fetchcert/.forgejo/workflows/tests.yaml
Emmanuel BENOîT 3b7757b1d9
All checks were successful
Run tests and linters / test (push) Successful in 42s
Run tests and linters / build (push) Successful in 41s
Run tests and linters / lint (push) Successful in 1m18s
chore: add support for build automation (#5)
This PR seeks to solve #2.

It adds a Makefile that can build, test, lint and package the code and the Forgejo workflows needed to automate the build. In addition, it resolves various issues highlighted by the linter.

Reviewed-on: #5
Co-authored-by: Emmanuel BENOÎT <tseeker@nocternity.net>
Co-committed-by: Emmanuel BENOÎT <tseeker@nocternity.net>
2024-07-26 14:07:46 +02:00

65 lines
1.1 KiB
YAML

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: Build binaries
run: |
make build