ci: replace Woodpecker with Forgejo Actions

This commit is contained in:
Dan Anglin 2023-08-28 14:39:18 +01:00
parent 7d7d87b57b
commit 578ad52896
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
3 changed files with 49 additions and 11 deletions

View 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

View file

@ -14,7 +14,17 @@ output:
linters:
enable-all: true
# disable:
disable:
- scopelint
- maligned
- exhaustivestruct
- deadcode
- interfacer
- nosnakecase
- ifshort
- varcheck
- golint
- structcheck
fast: false
linters-settings:

View file

@ -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