diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..8066c84 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,34 @@ +name: Go + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + go-version: [ + '1.22', + '1.21', + ] + + steps: + - uses: actions/checkout@v4 + - name: Setup Go ${{ matrix.go-version }} + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} + - name: Display Go version + run: go version + + - name: Install dependencies + run: go mod download + + - name: Build + run: go build -v ./... + + - name: Install staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@latest + + - name: Test + run: make test