diff options
Diffstat (limited to '.github/workflows/go.yml')
-rw-r--r-- | .github/workflows/go.yml | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..2d9e845 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,51 @@ +# Maintained in https://github.com/coreos/repo-templates +# Do not edit downstream. + +name: Go +on: + push: + branches: [main] + pull_request: + branches: [main] +permissions: + contents: read + +# don't waste job slots on superseded code +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Test + strategy: + matrix: + go-version: [1.18.x, 1.19.x, 1.20.x] + os: [ubuntu-latest] + include: + - go-version: 1.20.x + os: macos-latest + - go-version: 1.20.x + os: windows-latest + runs-on: ${{ matrix.os }} + steps: + - name: Set up Go 1.x + uses: actions/setup-go@v4 + with: + go-version: ${{ matrix.go-version }} + - name: Check out repository + uses: actions/checkout@v3 + - name: Check modules + run: go mod verify + - name: Build + shell: bash + run: make + - name: Test + shell: bash + run: make test + - name: Run linter + uses: golangci/golangci-lint-action@v3 + if: runner.os == 'Linux' + with: + version: v1.52.2 + args: -E=gofmt --timeout=30m0s |