CI #19
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| smoke: | |
| name: nix run smoke test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 60 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: nixbuild/nix-quick-install-action@2c9db80fb984ceb1bcaa77cdda3fdf8cfba92035 # v34, 2025-09-24 | |
| with: | |
| nix_conf: | | |
| keep-env-derivations = true | |
| keep-outputs = true | |
| - name: Restore and save Nix store | |
| uses: nix-community/cache-nix-action@7df957e333c1e5da7721f60227dbba6d06080569 # v7, 2026-01-08 | |
| with: | |
| primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} | |
| restore-prefixes-first-match: nix-${{ runner.os }}- | |
| gc-max-store-size-linux: 2G | |
| purge: true | |
| purge-prefixes: nix-${{ runner.os }}- | |
| purge-created: 0 | |
| purge-last-accessed: P1DT12H | |
| purge-primary-key: never | |
| - name: nix flake check | |
| run: nix flake check --print-build-logs | |
| # Discover the boxes from the flake itself instead of hard-coding them | |
| # so adding/removing one in nix/packages.nix is automatically picked | |
| # up by CI. Each `nix run` builds the box and its wrapped CLI, launches | |
| # the node script, and exits 0 from the box-level help — a runtime | |
| # equivalent of a build + launcher smoke test. | |
| - name: smoke test every box | |
| run: | | |
| set -euo pipefail | |
| boxes=$( | |
| nix eval --json ".#packages.$(nix eval --impure --raw --expr builtins.currentSystem)" \ | |
| --apply 'ps: builtins.filter (n: n != "default") (builtins.attrNames ps)' \ | |
| | nix run nixpkgs#jq -- -r '.[]' | |
| ) | |
| echo "Boxes discovered: $(echo $boxes | tr '\n' ' ')" | |
| for box in $boxes; do | |
| echo "::group::$box --help" | |
| nix run ".#$box" -- --help | |
| echo "::endgroup::" | |
| done |