From c5d4db4ae1be998cde897495d34488c4aa3e766c Mon Sep 17 00:00:00 2001 From: itsamejms Date: Sun, 6 Sep 2026 23:25:46 +0100 Subject: [PATCH] ci: gitea workflow (lint + self-checks + tsc/vite build + cargo test) npm run check aggregates the three node self-checks so CI (and humans) run them with one command. Node 23.6+ required for bare .ts execution. --- .gitea/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 41 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..8f7f7cc --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,40 @@ +# ponytail: two jobs, no matrix, no third-party actions beyond checkout + +# setup-node (both mirrored on gitea.com and github) so this runs on any +# act_runner config. Rust toolchain installs via rustup if missing. +name: CI +on: + push: + branches: [main] + pull_request: + +jobs: + frontend: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + # 23.6+ for native TS type-stripping (scripts/check-*.ts run bare .ts) + node-version: 23 + - run: npm ci + - run: npm run lint + - run: npm run check + - run: npm run build + + rust: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Tauri system deps + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev \ + librsvg2-dev pkg-config libssl-dev + - name: Install Rust + run: | + if ! command -v rustup >/dev/null; then + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" + fi + - run: cargo test --manifest-path src-tauri/Cargo.toml \ No newline at end of file diff --git a/package.json b/package.json index ba50a50..187e7c6 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "dev": "vite", "build": "tsc -b && vite build", "lint": "oxlint", + "check": "node scripts/check-dice.ts && node scripts/check-encounter-budget.ts && node scripts/check-worldmap.ts", "preview": "vite preview", "tauri": "tauri" },