chore: add support for linting
This commit is contained in:
parent
0290ef59b6
commit
7f0dd549fd
6 changed files with 1176 additions and 31 deletions
.forgejo/workflows
|
@ -1,30 +0,0 @@
|
|||
name: Build and test project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull-request:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: debian-12
|
||||
steps:
|
||||
-
|
||||
name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Extract Go version
|
||||
id: go-version
|
||||
run: |
|
||||
sed '/^go /!d; s/go /version=/' go.mod >>"$GITHUB_OUTPUT"
|
||||
-
|
||||
name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ steps.go-version.outputs.version }}
|
||||
-
|
||||
name: Run tests
|
||||
run: |
|
||||
make test
|
66
.forgejo/workflows/tests.yaml
Normal file
66
.forgejo/workflows/tests.yaml
Normal file
|
@ -0,0 +1,66 @@
|
|||
name: Run tests and linters
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull-request:
|
||||
branches: [master]
|
||||
|
||||
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…
Add table
Add a link
Reference in a new issue