35 lines
651 B
YAML
35 lines
651 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Format check
|
|
if: runner.os == 'Linux'
|
|
run: test -z "$(gofmt -l cmd internal)"
|
|
|
|
- name: Vet
|
|
run: go vet ./...
|
|
|
|
- name: Build (CGO_ENABLED=0 — mode rilis)
|
|
run: CGO_ENABLED=0 go build ./cmd/tia-love
|
|
|
|
- name: Test
|
|
run: go test ./...
|