name: CI on: push: branches: [main] pull_request: workflow_dispatch: concurrency: group: magpie-ci-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: test: name: Test and build runs-on: ubuntu-latest steps: - uses: https://data.forgejo.org/actions/checkout@v4 - name: Go test and build run: | set -euo pipefail case "$GITHUB_WORKSPACE" in /data/*) HOST_WS="/opt/forgejo-runner/data${GITHUB_WORKSPACE#/data}" ;; *) HOST_WS="$GITHUB_WORKSPACE" ;; esac test -f "$GITHUB_WORKSPACE/go.mod" # Single -c string so host-mode act does not split the docker command. docker run --rm --network host \ -v "${HOST_WS}:/src" -w /src -e CGO_ENABLED=0 \ golang:1.25-bookworm \ sh -c "go version && go test ./... && make build && ls -la dist/"