From 43b5b1509e9793cc0582c63428c7848a3fbc3683 Mon Sep 17 00:00:00 2001 From: Matthieu Vachon Date: Sun, 9 Aug 2026 10:43:31 -0400 Subject: [PATCH] ci: add test workflow Adds a GitHub Actions workflow running go build and go test -race on pull requests and pushes to develop/main. The job id is `test` to match the required status check already configured on the protected branches. --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8b7b690 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Tests + +on: + push: + branches: + - develop + - main + pull_request: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} + cancel-in-progress: true + +jobs: + # The job id must stay `test`, it is the required status check name configured + # on the protected branches. + test: + name: 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 + check-latest: true + + - name: Build + run: go build ./... + + - name: Test + run: go test -race ./...