From fc3e59f0a1195fbf1e1dd7f2fd194d8289f57183 Mon Sep 17 00:00:00 2001 From: Jonathan Lundholm Date: Tue, 5 Mar 2024 21:40:00 +0100 Subject: [PATCH] Add workflow for PR checks --- .github/workflows/go.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 00000000..1687acbd --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,32 @@ +name: Go + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + version: ["1.18", "1.21"] + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: ${{ matrix.version }} + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + - name: Check formatting + run: | + go fmt ./... + git diff --exit-code