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