ci: replace Woodpecker with Forgejo Actions
This commit is contained in:
parent
7d7d87b57b
commit
578ad52896
3 changed files with 49 additions and 11 deletions
38
.forgejo/workflows/workflow.yaml
Normal file
38
.forgejo/workflows/workflow.yaml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
---
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
|
- reopened
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: docker
|
||||||
|
env:
|
||||||
|
GO_TEST_VERBOSE: "1"
|
||||||
|
GO_TEST_COVER: "1"
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
|
- name: Setup Go
|
||||||
|
uses: https://code.forgejo.org/actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: '1.21'
|
||||||
|
- name: Test
|
||||||
|
run: |
|
||||||
|
cd internal/build
|
||||||
|
go run magefiles/main.go -v test
|
||||||
|
|
||||||
|
lint:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: https://code.forgejo.org/actions/checkout@v3
|
||||||
|
- name: Setup Go
|
||||||
|
uses: https://code.forgejo.org/actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: '1.21'
|
||||||
|
- name: Lint
|
||||||
|
uses: https://github.com/golangci/golangci-lint-action@v3
|
||||||
|
with:
|
||||||
|
version: v1.54
|
|
@ -14,7 +14,17 @@ output:
|
||||||
|
|
||||||
linters:
|
linters:
|
||||||
enable-all: true
|
enable-all: true
|
||||||
# disable:
|
disable:
|
||||||
|
- scopelint
|
||||||
|
- maligned
|
||||||
|
- exhaustivestruct
|
||||||
|
- deadcode
|
||||||
|
- interfacer
|
||||||
|
- nosnakecase
|
||||||
|
- ifshort
|
||||||
|
- varcheck
|
||||||
|
- golint
|
||||||
|
- structcheck
|
||||||
fast: false
|
fast: false
|
||||||
|
|
||||||
linters-settings:
|
linters-settings:
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
pipeline:
|
|
||||||
dagger:
|
|
||||||
image: golang:1.20.4-alpine
|
|
||||||
commands:
|
|
||||||
- apk add docker-cli
|
|
||||||
- cd internal/build
|
|
||||||
- go run .
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
Loading…
Reference in a new issue