Skip to content
on:
push:
branches:
- master
pull_request:
branches:
- master
name: test and build
jobs:
build:
strategy:
matrix:
goversion: [1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21]
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Checkout code
uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
- name: Run linters
run: |
export PATH=$PATH:$(go env GOPATH)/bin
./pre-commit
test:
runs-on: ubuntu-latest
strategy:
matrix:
goversion: [1.13, 1.14, 1.15, 1.16, 1.17, 1.18, 1.19, 1.20, 1.21]
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.goversion }}
- name: Checkout code
uses: actions/checkout@v3
- name: Run tests
run: |
go version
make test
inttest:
runs-on: ubuntu-latest
strategy:
matrix:
buildversion: [1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18]
testversion: [1.12, 1.13, 1.14, 1.15, 1.16, 1.17, 1.18]
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.buildversion }}
- name: Checkout code
uses: actions/checkout@v3
- name: Build binary for inttest
run: |
go version
GO111MODULE=on make build-linux
- name: Install Go
if: success()
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.testversion }}
- name: Integration test
run: |
go version
make inttest
build:

Check failure on line 80 in .github/workflows/test_and_build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test_and_build.yml

Invalid workflow file

You have an error in your yaml syntax on line 80
runs-on: ubuntu-latest
needs: [lint, test, inttest]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21.x
- name: Checkout code
uses: actions/checkout@v2
- name: build
run: |
go version
make build-linux
make build-windows
make build-darwin
- name: upload artifacts
uses: actions/upload-artifact@master
with:
name: bin
path: bin/