Skip to content

CI Jobs

This reference documents the CI jobs defined in .github/workflows/ci.yaml and how to run equivalent checks locally.

The CI pipeline runs on push to main, pull requests, and manual dispatch. Jobs are organized in a dependency graph to optimize execution time and catch failures early.

secrets-scan
└── set-variables
├── preview-release-version (PR only)
├── preview-docs-deploy (PR only)
├── bootstrap-verification
├── secrets-workflow
├── flake-validation
├── cache-overlay-packages
│ └── nix (matrix)
└── typescript (matrix)
└── production-release-packages (main only)
└── production-docs-deploy (main only)

Scans repository for hardcoded secrets using gitleaks.

AttributeValue
Runnerubuntu-latest
TriggersAll (always runs first)
Local equivalentnix run nixpkgs#gitleaks -- detect --verbose --redact

Note: CI uses nix run nixpkgs#gitleaks directly rather than the justfile recipe.

Determines deployment settings and discovers packages for matrix jobs.

AttributeValue
Runnerubuntu-latest
TriggersAfter secrets-scan
Local equivalentjust list-packages-json

Outputs:

  • debug - Whether debug mode is enabled
  • deploy_enabled - Whether docs deployment is enabled
  • deploy_environment - Target environment (preview/production)
  • packages - JSON array of packages for matrix jobs
  • force-ci - Whether to force execution

Previews semantic-release version for each package (PR only).

AttributeValue
Runnerubuntu-latest
TriggersPull requests only
MatrixPer package
Local equivalentjust preview-version main packages/<name>

Deploys documentation to preview environment.

AttributeValue
RunnerVia deploy-docs.yaml
TriggersPull requests only
Environmentpreview
Local equivalentjust docs-deploy-preview

Preview URL: https://b-<branch>-infra-docs.sciexp.workers.dev

Validates Makefile bootstrap workflow on clean Ubuntu system.

AttributeValue
Runnerubuntu-latest
TriggersAll
Local equivalentmake bootstrap && make verify && make setup-user

Verifies:

  • Nix installation via DeterminateSystems installer
  • direnv configuration
  • Age key generation for sops

Tests sops-nix mechanics with ephemeral test keys.

AttributeValue
Runnerubuntu-latest
TriggersAll
Local equivalentManual sops encrypt/decrypt test

Creates ephemeral age keys, encrypts test secrets, and verifies decryption works correctly.

Validates flake structure, justfile recipes, and runs nix flake check.

AttributeValue
Runnerubuntu-latest
TriggersAll
Local equivalentjust check

Verifies:

  • Core justfile recipes exist (activate, verify, check, lint)
  • nix flake check passes (includes VM tests on Linux)

For faster local iteration: just check-fast excludes VM tests (~1-2 min vs ~7 min).

Pre-caches resource-intensive overlay packages before main build.

AttributeValue
Runnerubuntu-latest (x86_64), ubuntu-24.04-arm (aarch64)
TriggersAll
Matrixx86_64-linux, aarch64-linux
Local equivalentjust cache-overlay-packages <system>

Prevents disk space exhaustion during CI builds, especially for Rust packages.

Builds flake outputs via category-based matrix for disk space optimization.

AttributeValue
Runnerubuntu-latest (x86_64), ubuntu-24.04-arm (aarch64)
TriggersAll
Depends oncache-overlay-packages
Local equivalentjust ci-build-category <system> <category> [config]

Matrix configurations:

SystemCategoryConfigDescription
x86_64-linuxpackages-Overlay packages
x86_64-linuxchecks-devshells-Checks and dev shells
x86_64-linuxhome-Home-manager configs
x86_64-linuxnixoscinnabarNixOS server
x86_64-linuxnixoselectrumNixOS server
aarch64-linuxpackages-Overlay packages
aarch64-linuxchecks-devshells-Checks and dev shells
aarch64-linuxhome-Home-manager configs

Tests TypeScript packages (docs site).

AttributeValue
RunnerVia package-test.yaml
TriggersAll
MatrixPer package
Local equivalentjust test-package <package>

Runs:

  • bun install
  • bun run test:unit
  • bun run test:coverage
  • bun run build
  • bun run test:e2e

Releases packages via semantic-release on main branch.

AttributeValue
RunnerVia package-release.yaml
TriggersPush to main/beta only
MatrixPer package
Local equivalentjust release-package <package> (dry run)

Deploys documentation to production.

AttributeValue
RunnerVia deploy-docs.yaml
TriggersPush to main only
Environmentproduction
Local equivalentjust docs-deploy-production

Production URL: https://infra.cameronraysmith.net

Terminal window
# Run all checks (equivalent to flake-validation job)
just check
# Fast checks only (skip VM tests)
just check-fast
Terminal window
# Test specific package
just test-package docs
# Preview release version
just preview-version main packages/docs
Terminal window
# Build specific category
just ci-build-category x86_64-linux packages
just ci-build-category x86_64-linux nixos cinnabar
# Build all outputs for current system
just ci-build-local
Terminal window
# Full docs test suite
just docs-test
# Preview deployment
just docs-deploy-preview
# Link validation
just docs-linkcheck

CI uses per-job content-addressed caching to skip unchanged jobs. The caching is based on:

  • Content hash of relevant source files
  • GitHub Actions cache API

To force re-execution:

  • Add the force-ci label to a PR
  • Use force_run: true in workflow dispatch

See ADR-0016 for details.

flake-validation fails:

Terminal window
# Check locally
just check
# For faster iteration
just check-fast x86_64-linux

nix build fails:

Terminal window
# Build specific category locally
just ci-build-category <system> <category>
# Check disk space
df -h

typescript tests fail:

Terminal window
# Run tests locally
just test-package docs
# Check coverage
just docs-test-coverage
Terminal window
# View latest run logs
just ci-logs
# View only failed logs
just ci-logs-failed
# Debug specific job
just ci-debug-job ci.yaml "nix (x86_64-linux, packages)"