diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 6f605e0..8532c94 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,26 +7,33 @@ on: branches: [ master ] jobs: - build: - name: Build + test: + name: Test runs-on: ubuntu-latest + strategy: + matrix: + go: [ "1.16", "1.17", "1.18" ] steps: - - name: Check out - uses: actions/checkout@v2 + - uses: actions/checkout@v2 - - name: Setup Go - uses: actions/setup-go@v2 - with: - go-version: ^1.17 + - uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go }} + check-latest: true - - name: Build - run: go build -v ./... + - name: Build + run: go build -v ./... - - name: Test - run: go test -v -coverprofile=coverage.txt -shuffle on ./... + - name: Test + if: ${{ matrix.go != '1.16' }} + run: go test -v -coverprofile=coverage.txt -shuffle on ./... - - name: Coverage - uses: codecov/codecov-action@v1.0.13 + - name: Test + if: ${{ matrix.go == '1.16' }} + run: go test -v -coverprofile=coverage.txt ./... + + - name: Coverage + uses: codecov/codecov-action@v2 lint: name: Lint