Skip to content

ci: add GitHub Actions workflow for tests #1

ci: add GitHub Actions workflow for tests

ci: add GitHub Actions workflow for tests #1

Workflow file for this run

name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.18', '1.19', '1.20', '1.21', '1.22', '1.23' ]
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}