ci: Forgejo Actions workflows and make targets
- Add make fmt-check, go-ci, admin-ci and ci so CI and a local run do the same thing - Add a ci workflow: Go (gofmt, vet, race tests) and the admin UI (tests, type check, build) - Add a manual e2e workflow for runners that can run Docker
This commit is contained in:
parent
11d6e21f41
commit
65528830d3
2 changed files with 53 additions and 1 deletions
23
.forgejo/workflows/ci.yaml
Normal file
23
.forgejo/workflows/ci.yaml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
# Runs on Forgejo Actions (Codeberg). Enable Actions in the repository settings and make sure
|
||||
# a runner with the `docker` label is available; change `runs-on` if yours is named differently.
|
||||
name: ci
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
go:
|
||||
runs-on: docker
|
||||
container: golang:1.27
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: make go-ci
|
||||
|
||||
admin:
|
||||
runs-on: docker
|
||||
container: node:24
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: make admin-ci
|
||||
16
.forgejo/workflows/e2e.yaml
Normal file
16
.forgejo/workflows/e2e.yaml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# The end-to-end test starts Postfix and parsimony in Docker, so it needs a runner that can run
|
||||
# Docker itself. Start it by hand from the Actions tab (or run `make e2e` locally).
|
||||
name: e2e
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- run: make e2e
|
||||
Loading…
Reference in a new issue