name: CI on: push: branches: [main] pull_request: permissions: contents: read concurrency: group: ci-${{ github.ref }} cancel-in-progress: true jobs: # The job runs as root in an Arch container, on Forgejo and GitHub alike. # dbus-daemon runs the integration tests against a private bus; gcc is for # the race detector. check: runs-on: ubuntu-latest container: image: archlinux:latest options: --init steps: - run: pacman -Syu --noconfirm --needed git go gcc dbus - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" test "$(go env GOVERSION | cut -d. -f1-2)" = "go$(sed -n 's/^go \([0-9]*\.[0-9]*\).*/\1/p' go.mod)" - run: test -z "$(gofmt -l .)" - run: go vet ./... - run: GOARCH=386 go vet ./... - run: go test -race -count=1 ./... - name: Fuzz smoke run: | go test -run '^$' -fuzz '^FuzzParse$' -fuzztime 20s . go test -run '^$' -fuzz '^FuzzSkip$' -fuzztime 20s . go test -run '^$' -fuzz '^FuzzCheck$' -fuzztime 20s .