chore: update project template
- workflow: run the test job only when the PR is not in the draft state. - workflow: use the remote mage-ci action to run the tests via mage. - workflow: remove the lint job for now. In the future it may be replaced by a step. - lint: update .golangci.yaml
This commit is contained in:
parent
4fd8e37f68
commit
308d286646
2 changed files with 9 additions and 20 deletions
|
@ -1,13 +1,15 @@
|
||||||
---
|
---
|
||||||
|
name: Workflow
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
- reopened
|
|
||||||
- synchronize
|
- synchronize
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
if: ${{ ! github.event.pull_request.draft }}
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
env:
|
env:
|
||||||
GO_TEST_VERBOSE: "1"
|
GO_TEST_VERBOSE: "1"
|
||||||
|
@ -15,23 +17,10 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
- name: Setup Go
|
|
||||||
uses: https://code.forgejo.org/actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.22'
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go run magefiles/main.go -v test
|
uses: https://codeflow.dananglin.me.uk/actions/mage-ci@main
|
||||||
|
|
||||||
lint:
|
|
||||||
runs-on: docker
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repository
|
|
||||||
uses: https://code.forgejo.org/actions/checkout@v4
|
|
||||||
- name: Setup Go
|
|
||||||
uses: https://code.forgejo.org/actions/setup-go@v5
|
|
||||||
with:
|
with:
|
||||||
go-version: '1.22'
|
target: test
|
||||||
- name: Lint
|
env:
|
||||||
uses: https://github.com/golangci/golangci-lint-action@v3
|
PROJECT_TEST_VERBOSE: "1"
|
||||||
with:
|
PROJECT_TEST_COVER: "1"
|
||||||
version: v1.54
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ run:
|
||||||
tests: true
|
tests: true
|
||||||
|
|
||||||
output:
|
output:
|
||||||
format: colored-line-number
|
formats: colored-line-number
|
||||||
print-issues-lines: true
|
print-issues-lines: true
|
||||||
print-linter-name: true
|
print-linter-name: true
|
||||||
uniq-by-line: true
|
uniq-by-line: true
|
||||||
|
|
Loading…
Reference in a new issue