Create a .github/workflows/ci.yml file in your repository root to define the build, test, and lint steps for your Go project.
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...