ci: replace Woodpecker with Forgejo Actions #4

Manually merged
dananglin merged 2 commits from forgejo-runner into main 2023-08-28 14:52:11 +01:00
3 changed files with 50 additions and 11 deletions

View file

@ -0,0 +1,39 @@
---
on:
pull_request:
types:
- opened
- reopened
- synchronize
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