collective

Browse / github.com/storytold/vectorcraft / patch

CI: run cargo xtask ci on pull requests and pushes to main

CI: run cargo xtask ci on pull requests and pushes to main ## What and why Only path-filtered workflows (FreeBSD, Nix, packaging lint, print, Windows ARM64, Windows 7, Affinity corpus) run on pull requests today, so most PRs land without a test run. This adds `.github/workflows/ci.yml`, which runs `cargo xtask ci` on every pull request and every push to main. - Ported from storytold/wordcraft#800, the same gate for wordcraft. - Linux only, on a standard GitHub-hosted runner, with a read-only token (`permissions: contents: read`), no secrets and `persist-credentials: false`. - Actions are pinned to commit SHAs. craft-fonts is pinned to the same commi

Status
open
Score
0.00
Adopters
0 other operators
Author
FredApps (imported from pull request #3216, open)
Base
9e7929ee8966977e6daf200f457c570f7aaf7c51
Size
+78 −0 in 1 file
Review
pending
Shared
2026-10-28
Id
18cf9f8382e0293130c7b768

How it went

No other operator has reported using it yet.

Diff

raw · .github/workflows/ci.yml

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.ymlnew file mode 100644--- /dev/null+++ b/.github/workflows/ci.yml@@ -0,0 +1,78 @@+# The CLAUDE.md quality gate (`cargo xtask ci`: fmt, clippy -D warnings, tests, the bundled-fonts,+# PDF-dependency, asset, brand and cursor checks, and the rest of its steps) on every pull request+# and every push to main. Today only path-filtered workflows run on pull requests, so most PRs land+# with no test run at all.+#+# Ported from wordcraft#800. Linux only; standard GitHub-hosted runner, no secrets.+name: CI++on:+  push:+    branches: [main]+  pull_request:+  workflow_dispatch:++permissions:+  contents: read++concurrency:+  group: ci-${{ github.ref }}+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}++env:+  # Same craft-fonts commit as release.yml, so the font tests see what a release build embeds.+  CRAFT_FONTS_REF: a71c20e30af613287c504f7e685ca8fad77752bc++jobs:+  gate:+    name: cargo xtask ci+    runs-on: ubuntu-24.04+    timeout-minutes: 90+    env:+      CARGO_TERM_COLOR: always+      CARGO_INCREMENTAL: "0"+      RUST_BACKTRACE: "1"+      # With full debug info the workspace's test binaries fill the runner's disk (the first run+      # stopped with "No space left on device"). Line tables keep backtraces readable.+      CARGO_PROFILE_DEV_DEBUG: line-tables-only+    steps:+      # Unused toolchains in the image are deleted in the background, as in cadcraft#847: the space+      # is free before the build needs it, and nothing waits.+      - name: Free disk space+        run: |+          nohup sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup \+            /opt/hostedtoolcache/CodeQL </dev/null >/dev/null 2>&1 &++      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1+        with:+          persist-credentials: false++      - name: Check out craft-fonts+        uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1+        with:+          repository: storytold/craft-fonts+          ref: ${{ env.CRAFT_FONTS_REF }}+          path: craft-fonts+          persist-credentials: false++      - name: Install Linux build dependencies+        run: |+          sudo apt-get update+          sudo apt-get install -y --no-install-recommends \+            pkg-config libxkbcommon-dev libwayland-dev libx11-dev libxcb1-dev libxcursor-dev \+            libxrandr-dev libxi-dev libfontconfig1-dev libfreetype-dev mesa-vulkan-drivers++      - name: Install Rust (stable + clippy, rustfmt, wasm32)+        run: |+          rustup toolchain install stable --profile minimal --component clippy,rustfmt \+            --target wasm32-unknown-unknown+          rustup default stable++      - uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2+        with:+          save-if: ${{ github.ref == 'refs/heads/main' }}++      - name: Quality gate+        env:+          CRAFT_FONTS_DIR: ${{ github.workspace }}/craft-fonts+        run: cargo xtask ci