chore: Bump Go version and add Makefile #243
Workflow file for this run
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: Go | |
on: [push] | |
jobs: | |
building: | |
name: Build and cache dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22 | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
testing: | |
name: Run tests | |
needs: [building] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22 | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Run tests and generate coverage | |
run: make test | |
- name: Report coverage | |
uses: shogo82148/actions-goveralls@v1 | |
with: | |
path-to-profile: profile.cov | |
testing-race: | |
name: Run tests with race checker | |
needs: [building] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22 | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Test (race) | |
run: go test -race -v ./... | |
linting: | |
name: | |
runs-on: ubuntu-latest | |
needs: [building] | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 1.22 | |
cache: true | |
cache-dependency-path: go.sum | |
- name: Run linter | |
run: make lint |