Files
poimen-workflows/.gitea/workflows/ci.yaml
T
Story Crater Bot b2f0c129a2
ci / test (push) Successful in 44s
fix(ci): build multiple cmd packages to directory not file
go build -o flag with ./cmd/... builds multiple binaries. The -o path
must be a directory when building multiple packages, not a file.
2026-08-22 01:04:41 -07:00

36 lines
770 B
YAML

name: ci
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: golang
container:
image: golang:1.25
env:
GOPRIVATE: forgejo.riotpiao.com
GOFLAGS: -mod=readonly
GITHUB_TOKEN: ${{ secrets.REGISTRY_PAT }}
steps:
- name: Checkout code
run: |
git init
git remote add origin https://forgejo.riotpiao.com/rock/poimen-workflows.git
git fetch origin ${{ github.ref_name }} --depth=1
git checkout FETCH_HEAD
- name: Download dependencies
run: go mod download
- name: Test
run: go test -v ./...
- name: Build
run: go build -o /tmp/poimen-bin/ ./cmd/...
- name: Vet
run: go vet ./...