Prevent reconnecting on a closed events handler #297
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Validate Driver | |
permissions: | |
contents: read | |
pull-requests: write | |
checks: write | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/pr-validate-driver.yml" | |
- "**.go" | |
- "go.mod" | |
- "go.sum" | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
services: | |
core: | |
image: fauna/faunadb:latest | |
ports: | |
- 8443:8443 | |
strategy: | |
matrix: | |
go: [ '1.22', '1.21', '1.20', '1.19' ] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
cache: true | |
- name: Install tools | |
run: | | |
go install golang.org/x/tools/cmd/goimports@latest | |
- name: Fmt | |
run: | | |
LINE_COUNT=$(goimports -l . | wc -l) | |
if [ "$LINE_COUNT" -gt 0 ]; then | |
goimports -d . | |
exit 1 | |
fi | |
- name: Vet | |
run: go vet ./... | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v4 | |
- name: Test | |
run: go test -v ./... | |
- name: Run Benchmark | |
run: go test -bench=. ./... -benchmem | tee output.txt | |
- name: Download previous benchmark data | |
uses: actions/cache@v4 | |
with: | |
path: ./cache | |
key: ${{ runner.os }}-${{ matrix.go }}-benchmark | |
- name: Store benchmark result | |
uses: benchmark-action/github-action-benchmark@v1 | |
with: | |
name: Go Benchmark | |
tool: 'go' | |
output-file-path: output.txt | |
external-data-json-path: ./cache/benchmark-data.json | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
alert-threshold: '125%' | |
comment-on-alert: true | |
fail-on-alert: true |