Files
triplex/.gitea/workflows/ci.yml
micha c8f218c032
Some checks failed
CI / test (push) Failing after 16s
Updated error handling in the example command tool.
2026-02-21 04:37:59 +01:00

52 lines
1.0 KiB
YAML

name: CI
on:
push:
branches: ["**"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Verify formatting
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "These files are not gofmt-formatted:"
echo "$unformatted"
exit 1
fi
- name: Vet
run: go vet ./...
- name: Test
run: go test -v ./...
- name: Build
run: go build -o ./bin/triplex-example ./cmd/triplex-example
- name: Run example
run: |
set +e
./bin/triplex-example
rc1=$?
./bin/triplex-example --complete ABC-1234-D
rc2=$?
if [ $rc1 -ne 0 ] || [ $rc2 -ne 0 ]; then
echo "Example failed"
exit 1
fi
echo "Example ran successfully"