This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
fix: update deps #102
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
name: tests | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '>=1.20.0' | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.52.0 | |
test: | |
needs: lint | |
strategy: | |
matrix: | |
go: ['>=1.20.0'] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go }} | |
- uses: actions/checkout@v3 | |
- run: go mod download | |
- run: go test -race -covermode atomic -coverprofile=covprofile ./... | |
- name: Install goveralls | |
env: | |
GO111MODULE: off | |
run: go get github.com/mattn/goveralls | |
- name: Send coverage | |
env: | |
COVERALLS_TOKEN: ${{ github.token }} | |
GIT_BRANCH: ${{ github.head_ref }} | |
run: goveralls -parallel -coverprofile=covprofile -service=github -flagname="${{ runner.os }}-Go-${{ matrix.go }}" | |
finish: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.18.x | |
- uses: actions/checkout@v3 | |
- name: Install goveralls | |
env: | |
GO111MODULE: off | |
run: go get github.com/mattn/goveralls | |
- name: Send coverage | |
env: | |
COVERALLS_TOKEN: ${{ github.token }} | |
GIT_BRANCH: ${{ github.head_ref }} | |
run: goveralls -parallel-finish -service=github |