Files
Hop/.gitea/workflows/ci.yml
T
Hop de99aad4d4 Reconcile Gitea distribution with current alpha behavior and release tooling
Hop-State: A_06FN55REVAR7VQG4BWJBCD8
Hop-Proposal: R_06FN55QTEWKH16NSR59YJYG
Hop-Task: T_06FN3MBF98GWD4NA5PA1RWG
Hop-Attempt: AT_06FN55BQ80H2S8WHNDD24G0
2026-07-11 12:10:59 -07:00

68 lines
2.1 KiB
YAML

name: CI
on:
push:
branches:
- main
pull_request:
permissions:
code: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: https://gitea.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Go
uses: https://gitea.com/actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
cache: true
- name: Test with race detection
run: go test -race ./...
- name: Vet
run: go vet ./...
- name: Cross-compile supported targets
shell: bash
run: |
set -euo pipefail
for target in darwin/amd64 darwin/arm64 linux/amd64 linux/arm64 windows/amd64 windows/arm64; do
os=${target%/*}
arch=${target#*/}
output="dist-smoke/hop_${os}_${arch}"
if [[ "$os" == windows ]]; then output="${output}.exe"; fi
GOOS="$os" GOARCH="$arch" CGO_ENABLED=0 go build -trimpath -o "$output" ./cmd/hop
done
- name: Validate POSIX installer syntax
run: sh -n scripts/install.sh
- name: Smoke-test POSIX installer
run: sh scripts/test-install.sh
powershell-installer:
runs-on: windows-latest
steps:
- name: Check out repository
uses: https://gitea.com/actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set up Go
uses: https://gitea.com/actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
cache: true
- name: Validate PowerShell installer syntax
shell: pwsh
run: |
$tokens = $null
$errors = $null
[void][System.Management.Automation.Language.Parser]::ParseFile(
(Resolve-Path scripts/install.ps1), [ref]$tokens, [ref]$errors
)
if ($errors.Count -gt 0) {
$errors | Format-List | Out-String | Write-Error
exit 1
}
- name: Smoke-test PowerShell installer
shell: pwsh
run: ./scripts/test-install.ps1