From 548e318b10636445fa84ed0842d622a3132d4e3d Mon Sep 17 00:00:00 2001 From: Ubugeeei Date: Mon, 18 May 2026 13:37:48 +0900 Subject: [PATCH] ci: add pull request validation --- .github/workflows/ci.yml | 72 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..1b8f5a6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,72 @@ +name: CI + +on: + pull_request: + +permissions: + contents: read + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + node: + name: Node builds + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + cache-dependency-path: | + package-lock.json + docs/package-lock.json + + - name: Install app dependencies + run: npm ci + + - name: Install docs dependencies + run: npm --prefix docs ci + + - name: Typecheck + run: npm run typecheck + + - name: Build app + run: npm run build + + - name: Build render bundle + run: npm run build:render + + - name: Build docs + run: npm run docs:build + + rust: + name: Rust check + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + crate: + - backend + - render + steps: + - uses: actions/checkout@v4 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + ${{ matrix.crate }}/target + key: ${{ runner.os }}-cargo-${{ matrix.crate }}-${{ hashFiles(format('{0}/Cargo.lock', matrix.crate)) }} + + - name: Check ${{ matrix.crate }} + run: cargo check --manifest-path ${{ matrix.crate }}/Cargo.toml