Files
domainops/.github/workflows/ci.yml
T
Meghdad fad9dd448a build: update dependencies and fix CI vulnerability checks
- Upgrade Go to 1.27.3 and refresh application dependencies
- Update GoReleaser, its GitHub Action, and security tooling
- Update license generation and bundled notices
- Align documentation with the new Go requirement
2026-10-25 12:30:50 +03:30

109 lines
3.1 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (${{ matrix.os }})
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- name: Verify dependency checksums
run: go mod verify
- name: Verify formatting
if: runner.os == 'Linux'
run: test -z "$(gofmt -l cmd internal)"
- name: Test
run: go test -shuffle=on ./...
- name: Test with race detector
run: go test -race ./...
- name: Vet
run: go vet ./...
- name: Build
run: go build -trimpath ./cmd/domainops
vulnerability-scan:
name: Go vulnerability scan
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- name: Scan reachable code
run: go run golang.org/x/vuln/cmd/govulncheck@v1.9.0 ./...
release-config:
name: Validate release configuration
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Check out full history
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Check GoReleaser configuration
uses: goreleaser/goreleaser-action@a4f02ab5355a589de60d917a659ce617ed19b3de # v7.3.0
with:
distribution: goreleaser
version: v2.19.0
args: check
cross-build:
name: Cross-build supported targets
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- name: Build supported targets
shell: bash
run: |
set -euo pipefail
for os in linux darwin; do
for arch in amd64 arm64; do
CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build -trimpath -o "build/domainops-$os-$arch" ./cmd/domainops
done
done