name: CI on: push: branches: [main] tags: ['v*'] pull_request: concurrency: group: ci-${{ github.ref }} cancel-in-progress: true jobs: # Each OS runs its own native watcher: inotify, kqueue, ReadDirectoryChangesW. test: strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod - run: go vet ./... - run: go test -race -count=1 ./... # The BSDs have no hosted runner: check that kqueue builds there. build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod - run: | for target in freebsd/amd64 openbsd/amd64 netbsd/amd64 dragonfly/amd64 \ windows/386 windows/arm64 js/wasm wasip1/wasm plan9/amd64 solaris/amd64; do GOOS=${target%/*} GOARCH=${target#*/} go vet ./... || exit 1 done