chore: remove deprecated io/ioutil #59
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
on: [push, pull_request] | |
name: Test | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.20.x, 1.21.x] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/[email protected] | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/[email protected] | |
- uses: actions/[email protected] | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
- run: go test ./... | |
golangci: | |
name: lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
go-version: 1.21 | |
- uses: actions/[email protected] | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
if: success() | |
uses: actions/[email protected] | |
with: | |
go-version: 1.21.x | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Calc coverage | |
run: | | |
go test -v ./... -covermode=count -coverprofile=coverage.out | |
- name: Convert coverage.out to coverage.lcov | |
uses: jandelgado/[email protected] | |
- name: Coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.github_token }} | |
path-to-lcov: coverage.lcov |