Skip to content

chore(deps): bump the minor-and-patch group with 6 updates #61

chore(deps): bump the minor-and-patch group with 6 updates

chore(deps): bump the minor-and-patch group with 6 updates #61

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Cancel superseded runs on the same ref so rapid pushes don't pile up full
# pipelines — but never cancel on the default branch (we want every main build).
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
jobs:
# ===========================================================================
# Build & unit tests (required gate). Routed through the Makefile so local
# `make build` / `make cover` reproduces CI exactly.
# ===========================================================================
go:
name: Go
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- name: Download modules
run: make mod-download
- name: Verify module tidy
run: |
go mod tidy
git diff --exit-code go.mod go.sum
- name: Build
run: make build
- name: Test (unit, race + coverage)
run: make cover
- name: Benchmarks (smoke)
run: make bench-smoke
- name: Upload coverage
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.out
retention-days: 7
# ===========================================================================
# Integration tests (required gate). testcontainers spins up Postgres+Timescale,
# Redis, FalkorDB and Elasticsearch, so this leg needs Docker.
# ===========================================================================
integration:
name: Integration
runs-on: ubuntu-latest
needs: go
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- name: Integration tests (testcontainers)
run: make test-integration
# ===========================================================================
# Lint (required gate). golangci-lint-action provides install + caching that
# `make lint` cannot, so CI uses the action while local dev uses `make lint`.
# ===========================================================================
lint:
name: Lint
runs-on: ubuntu-latest
needs: go
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
args: --timeout 10m
# ===========================================================================
# Docker image (required gate). Validates the vendored, hermetic build on
# every PR and pushes a :edge snapshot on main. The release multi-arch image
# is built by goreleaser on a tag (release.yml) — this leg is amd64-only and
# exists to catch Dockerfile breakage early.
# ===========================================================================
docker:
name: Docker image
runs-on: ubuntu-latest
needs: go
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
cache-dependency-path: go.sum
# The Dockerfile builds from a vendored tree (grove `replace` directives
# point outside this tree until grove is tagged), so vendor first.
- name: Vendor dependencies
run: make vendor
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=edge,enable={{is_default_branch}}
type=sha
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: deploy/docker/Dockerfile
platforms: linux/amd64
push: ${{ github.ref == 'refs/heads/main' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# ===========================================================================
# Required check gate. Branch protection can require just "CI Success" instead
# of enumerating every job — this aggregates their results.
# ===========================================================================
ci-success:
name: CI Success
needs: [go, integration, lint, docker]
runs-on: ubuntu-latest
if: always()
steps:
- name: Verify required jobs succeeded
run: |
for result in \
"go:${{ needs.go.result }}" \
"integration:${{ needs.integration.result }}" \
"lint:${{ needs.lint.result }}" \
"docker:${{ needs.docker.result }}"; do
name="${result%%:*}"; status="${result##*:}"
if [[ "$status" != "success" ]]; then
echo "::error::Required CI job '$name' did not succeed (result: $status)"
exit 1
fi
done
echo "All required CI jobs passed!"