34 lines
860 B
YAML
34 lines
860 B
YAML
name: Go CI
|
|
|
|
on: [push, pull_request] # Triggers on push or pull request events
|
|
|
|
jobs:
|
|
test:
|
|
name: Test and Lint
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v4
|
|
with:
|
|
go-version: '1.25.3'
|
|
- name: Configure Git for SSH
|
|
run: |
|
|
git config --global url."git@git.kundeng.us:".insteadOf "https://git.kundeng.us/"
|
|
go env -w GOPRIVATE=git.kundeng.us/phoenix/*
|
|
|
|
- name: Download dependencies
|
|
run: |
|
|
go mod download
|
|
|
|
- name: Run tests
|
|
run: go test -v ./... # Runs all tests in the project
|
|
|
|
- name: Run linter
|
|
uses: https://github.com/golangci/golangci-lint-action@v8
|
|
with:
|
|
go-version: '1.25.3'
|
|
version: latest
|