This repository has been archived on 2026-10-08. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
maestro/.gitea/workflows/ci.yml
T
Miguel PalhasandClaude Opus 5 1c349e5858
ci / web (push) Successful in 1m30s
ci / rust (push) Successful in 3m42s
ci / flake (push) Successful in 5m50s
ci(maestro): cancel superseded runs
Pushes queued a new run without stopping the old one. Group by ref and
cancel in-progress, except on main where runs finish.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 10:35:31 +01:00

135 lines
4.5 KiB
YAML

name: ci
on:
push:
branches:
- main
- 'linear/**'
pull_request:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install tmux + build deps
run: |
apt-get update
apt-get install -y --no-install-recommends \
tmux git curl ca-certificates build-essential pkg-config
- name: Install rustup + stable toolchain
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --profile minimal --default-toolchain stable \
--component rustfmt --component clippy
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Install Node.js + pnpm
run: |
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y --no-install-recommends nodejs
corepack enable
corepack prepare pnpm@9.15.4 --activate
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', '**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: fmt
run: cargo fmt --all -- --check
- name: clippy
run: cargo clippy --all-targets -- -D warnings
- name: test
run: cargo test --all
# NAP-271: the umbrella `maestro` binary is feature-gated (cli / daemon /
# tui). Verify each subset compiles and its tests pass on its own, and
# that building with no features at all is rejected.
- name: feature-gate matrix
run: |
set -euo pipefail
for f in cli daemon tui; do
echo "::group::maestro --no-default-features --features $f"
cargo build -p maestro --no-default-features --features "$f"
cargo test -p maestro --no-default-features --features "$f"
echo "::endgroup::"
done
echo "::group::maestro with no features must fail to compile"
if cargo build -p maestro --no-default-features 2>/dev/null; then
echo "expected build with no features to fail, but it succeeded" >&2
exit 1
fi
echo "::endgroup::"
web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Node.js + pnpm
run: |
apt-get update
apt-get install -y --no-install-recommends curl ca-certificates
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y --no-install-recommends nodejs
corepack enable
corepack prepare pnpm@9.15.4 --activate
- name: Install deps
run: pnpm -C web install --frozen-lockfile
- name: typecheck
run: pnpm -C web typecheck
- name: test
run: pnpm -C web test
- name: build
run: pnpm -C web build
# The flake pins pnpmDeps.hash against web/pnpm-lock.yaml (#98). A lockfile
# change invalidates the pin silently elsewhere, so the packaged build has to
# fail here too.
flake:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# The runner container is root with no `nixbld` group, but the installer
# writes `build-users-group = nixbld` anyway and then fails on it, so the
# config goes in first. Flakes are off by default and `nix build .#…`
# needs them. Written again afterwards in case the installer replaced it.
- name: Install nix
run: |
mkdir -p /etc/nix
printf 'build-users-group =\nexperimental-features = nix-command flakes\n' > /etc/nix/nix.conf
curl -fsSL https://nixos.org/nix/install | sh -s -- --no-daemon --yes
printf 'build-users-group =\nexperimental-features = nix-command flakes\n' > /etc/nix/nix.conf
echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH"
# The installer does not enable flakes, so `nix build .#…` needs the
# features passed explicitly — a local machine that has them in
# nix.conf will build fine while CI fails without this.
- name: build flake packages
run: |
nix --extra-experimental-features "nix-command flakes" build \
.#webFrontend \
.#maestro \
.#maestro-web \
--no-link