Files
poimen-workflows/.gitea/workflows/ci.yaml
T
Test 2c62f4bd1c
Build & Push Workflows Image / build-push (push) Failing after 29s
ci / test (push) Failing after 3m6s
chore: unify Go version to 1.26.0 with kmsvc and api-gw
2026-09-05 14:41:13 -07:00

44 lines
1.1 KiB
YAML

name: ci
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: golang
container:
image: golang:1.26
env:
GOPRIVATE: forgejo.riotpiao.com
GITHUB_TOKEN: ${{ secrets.REGISTRY_PAT }}
steps:
- name: Configure git authentication
run: |
git config --global url."https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com".insteadOf "https://forgejo.riotpiao.com"
git config --global credential.helper store
echo "https://oauth2:${{ secrets.REGISTRY_PAT }}@forgejo.riotpiao.com" >> ~/.git-credentials
- 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: Tidy modules
run: go mod tidy
- name: Test
run: go test -v ./...
- name: Build
run: go build -o /tmp/poimen-bin/ ./cmd/...
- name: Vet
run: go vet ./...