Merge pull request #100 from coreosbot-releng/repo-templates #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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.15.x, 1.16.x, 1.17.x, 1.18.x, 1.19.x, 1.20.x] | |
runs-on: ubuntu-latest | |
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: Build | |
run: ./build.sh | |
- name: Test | |
run: ./test.sh | |
- name: Run linter | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.55.1 | |
args: -E=gofmt --timeout=30m0s |