Skip to content

github actions: update go version and actions #44

github actions: update go version and actions

github actions: update go version and actions #44

Workflow file for this run

on: [push, pull_request]
name: test
jobs:
test:
strategy:
matrix:
go-version: [1.20.x, 1.21.x, 1.22.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run unit tests
run: go test -v -race -cover
coverage:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Checkout code
uses: actions/checkout@v4
- name: Run unit tests with coverage
run: go test -v -race -coverprofile=coverage.txt
- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage.txt
flags: unittests