feat: scaffold interpres project with TOML parser and CI

This commit is contained in:
2026-06-20 12:24:03 +02:00
commit 591d1f01d1
18 changed files with 2637 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
name: Test
on:
push:
branches: [development]
pull_request:
branches: [development]
jobs:
vet:
runs-on: codeberg-small
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: https://data.forgejo.org/actions/setup-go@v5
with:
go-version: "1.26"
- name: gofmt
# gofmt -l prints unformatted files; an empty output is the only pass.
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "These files need gofmt:"
echo "$unformatted"
exit 1
fi
- name: go vet
run: go vet ./...
test:
runs-on: codeberg-small
needs: vet
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: https://data.forgejo.org/actions/setup-go@v5
with:
go-version: "1.26"
- name: go test -race
run: go test -race -count=1 ./...
- name: build example
run: go build ./examples/...
toml-test:
runs-on: codeberg-small
needs: vet
steps:
- uses: https://data.forgejo.org/actions/checkout@v4
- uses: https://data.forgejo.org/actions/setup-go@v5
with:
go-version: "1.26"
- name: Install toml-test
# A dev/CI tool only; it is not a module dependency of interpres.
run: go install github.com/toml-lang/toml-test/cmd/toml-test@latest
- name: Run the toml-test compliance suite
run: |
set -euo pipefail
go build -o bin/interpres-decode ./cmd/interpres-decode
"$(go env GOPATH)/bin/toml-test" bin/interpres-decode