cae651302a
CI / test (push) Failing after 1m25s
Gitea act runner image lacks bash, causing all run steps to fail with exit 127. Default shell to sh which is available in all images.
38 lines
646 B
YAML
38 lines
646 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
shell: sh
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Format check
|
|
run: |
|
|
diff=$(gofmt -l .)
|
|
if [ -n "$diff" ]; then
|
|
echo "Files need formatting:"
|
|
echo "$diff"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Test
|
|
run: go test -race -count=1 ./...
|
|
|
|
- name: Build
|
|
run: go build -trimpath -o nib .
|