ci: add Forgejo Actions Workflow

This commit is contained in:
Dan Anglin 2023-12-14 09:43:03 +00:00
parent d7c6a1a168
commit 59b7b0c794
Signed by: dananglin
GPG key ID: 0C1D44CFBEE68638
3 changed files with 50 additions and 1 deletions

View file

@ -0,0 +1,37 @@
---
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@v4
- name: Setup Go
uses: https://code.forgejo.org/actions/setup-go@v5
with:
go-version: '1.21'
- name: Test
run: go run magefiles/main.go -v test
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:
go-version: '1.21'
- name: Lint
uses: https://github.com/golangci/golangci-lint-action@v3
with:
version: v1.54

View file

@ -1,5 +1,4 @@
//go:build mage
// +build mage
package main

13
magefiles/main.go Normal file
View file

@ -0,0 +1,13 @@
//go:build ignore
package main
import (
"os"
"github.com/magefile/mage/mage"
)
func main() {
os.Exit(mage.Main())
}