Skip to content

Add GitHub Actions workflow for Go tests #2

Add GitHub Actions workflow for Go tests

Add GitHub Actions workflow for Go tests #2

Workflow file for this run

name: Go Test
on:
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test -v ./...
- name: Run tests with coverage
run: go test -v -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.txt
fail_ci_if_error: true