Bump actions/checkout from 3 to 4 #10
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: Build | |
jobs: | |
test: | |
name: Build and Test | |
strategy: | |
matrix: | |
go-version: [1.20.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Code format | |
run: diff -u <(echo -n) <(gofmt -d -s .) | |
- name: Vet | |
run: go vet ./... | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
- name: Unit tests | |
run: go test -race -coverprofile=coverage.out ./... | |
- name: Function coverage | |
run: go tool cover "-func=coverage.out" | |
- name: Upload coverage report | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.out | |
- name: Build and Test | |
run: | | |
./scripts/pushover-test.sh |