Files
syncbot/.github/workflows/ci.yml
T
iceBear67 a006483bbc
ci / test (push) Canceled after 0s
docker / build (push) Canceled after 0s
init
2026-08-14 07:13:22 +00:00

47 lines
974 B
YAML

name: ci
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
cache: true
- name: Check formatting
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "::error::gofmt needed for: $unformatted"
gofmt -d .
exit 1
fi
- name: Vet
run: go vet ./...
# The syncer tests drive a real git binary against temporary repositories.
- name: Test
run: go test -race -count=1 ./...
- name: Build
run: go build ./...
- name: Validate the example config
env:
SRC_TOKEN: dummy-token-for-validation
run: go run . -config config.example.toml -check