From 3779e64f09435dcefab06665faf7621bd7b9cc25 Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Wed, 28 Sep 2022 12:27:16 +0200 Subject: [PATCH] Add Github Action to go fmt, vet and build --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..4bce2e5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Build +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Go 1.18 + uses: actions/setup-go@v3 + with: + go-version: 1.18 + + - name: Format + run: go fmt && git diff --exit-code + + - name: Vet + run: go vet + + - name: Build + run: go build