tarakan-client/.forgejo/workflows/ci.yml
Maxfield Luke 5983a7df5a
Some checks are pending
CI / Test, vet, build (push) Waiting to run
ci(forgejo): add Actions for test, build, and releases
Host-mode workflows run Go inside golang:1.25-bookworm. CI covers
push/PR; tagged v* builds multi-arch artifacts and publishes a Forgejo
release.
2026-07-29 04:58:38 -04:00

41 lines
1.1 KiB
YAML

# Host-mode runner: Go via official image.
name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: tarakan-client-ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Test, vet, build
runs-on: ubuntu-latest
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- name: Go check
run: |
set -euo pipefail
case "$GITHUB_WORKSPACE" in
/data/*) HOST_WORKSPACE="/opt/forgejo-runner/data${GITHUB_WORKSPACE#/data}" ;;
*) HOST_WORKSPACE="$GITHUB_WORKSPACE" ;;
esac
test -f "$GITHUB_WORKSPACE/go.mod"
docker run --rm --network host \
--volume "$HOST_WORKSPACE:/src" \
--workdir /src \
-e CGO_ENABLED=0 \
golang:1.25-bookworm \
bash -lc '
set -euo pipefail
go version
go test -count=1 ./...
go vet ./...
make build
ls -la bin/tarakan
'