All checks were successful
CI / goreleaser-lint (pull_request) Successful in 10s
CI / format (pull_request) Successful in 1m30s
CI / lint (pull_request) Successful in 4m43s
CI / test (pull_request) Successful in 6m59s
CI / build (pull_request) Successful in 6m25s
CI / e2e (pull_request) Successful in 25m10s
Retrying dockerd was a coin flip. containerd needs a little over ten seconds to boot in the runner's container and dockerd waits exactly ten, so every attempt loses that race when the host is busy: run 19 burned all five and the job waited three minutes for a daemon that never arrived. Starting containerd first and handing dockerd the socket removes the timeout from the picture. Measured on the runner: ready in 30 seconds, no retries.
109 lines
3.1 KiB
YAML
109 lines
3.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
pull_request:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install make
|
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends make
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: go.mod
|
|
- run: make format
|
|
- run: git diff --exit-code
|
|
|
|
goreleaser-lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- uses: goreleaser/goreleaser-action@v6.4.0
|
|
with:
|
|
args: check
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install make
|
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends make
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: go.mod
|
|
- run: make ci-lint
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install make
|
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends make build-essential
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: go.mod
|
|
- run: make test
|
|
|
|
e2e:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
dind:
|
|
image: docker:27-dind
|
|
env:
|
|
DOCKER_TLS_CERTDIR: ""
|
|
# GitHub honours this. The Forgejo runner ignores a workflow's options
|
|
# and takes `privileged` from its own config, which is set there.
|
|
options: --privileged
|
|
# containerd needs a little over ten seconds to boot on this runner and
|
|
# dockerd waits exactly ten, a limit no flag changes. Start containerd
|
|
# first and hand dockerd the socket, and there is no race to lose.
|
|
cmd:
|
|
- sh
|
|
- -c
|
|
- >-
|
|
containerd &
|
|
sleep 8;
|
|
exec dockerd-entrypoint.sh dockerd --containerd /run/containerd/containerd.sock
|
|
--host=tcp://0.0.0.0:2375 --host=unix:///var/run/docker.sock
|
|
env:
|
|
DOCKER_HOST: tcp://dind:2375
|
|
TESTCONTAINERS_RYUK_DISABLED: true
|
|
steps:
|
|
- name: Install make
|
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends make
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: e2e/go.mod
|
|
- uses: oven-sh/setup-bun@v2
|
|
- name: Wait for Docker
|
|
run: |
|
|
for i in $(seq 1 120); do
|
|
docker info >/dev/null 2>&1 && exit 0
|
|
sleep 1
|
|
done
|
|
echo "Docker daemon not ready" >&2
|
|
exit 1
|
|
- name: Install Playwright browsers
|
|
run: make e2e-install
|
|
- run: make e2e
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install make and UPX
|
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends make upx-ucl
|
|
- uses: actions/checkout@v7
|
|
- uses: actions/setup-go@v7
|
|
with:
|
|
go-version-file: go.mod
|
|
- uses: oven-sh/setup-bun@v2
|
|
- uses: goreleaser/goreleaser-action@v6.4.0
|
|
with:
|
|
install-only: true
|
|
- run: make build
|