Skip to content

chore: Bump Go version and add Makefile #243

chore: Bump Go version and add Makefile

chore: Bump Go version and add Makefile #243

Workflow file for this run

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