From fe456cff0166fe4035da6e26ea6ec88fd0ea833d Mon Sep 17 00:00:00 2001 From: Aleem Haji Date: Sun, 7 May 2023 01:27:19 -0400 Subject: [PATCH] Adds gha --- .github/workflows/go.yaml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/go.yaml diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml new file mode 100644 index 0000000..5595027 --- /dev/null +++ b/.github/workflows/go.yaml @@ -0,0 +1,34 @@ +name: Go + +on: push + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.x + uses: actions/setup-go@v3 + with: + go-version: ^1.19 + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v3 + + - name: Install Staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@v0.4.3 + + - name: Install Dependencies + run: go mod download + + - name: Lint + run: | + if [ -n "$(make fmt)" ]; then + echo >&2 "Linting failed. Fix files listed above." + exit 1 + fi + + - name: Test + run: make test