name: CI on: push: branches: [main, develop] pull_request: branches: [main] env: CARGO_TERM_COLOR: always RUST_BACKTRACE: 1 jobs: lint: name: Lint & Format Check runs-on: windows-latest steps: - uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 9 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm cache-dependency-path: desktop/pnpm-lock.yaml - name: Cache Cargo uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- - name: Check Rust formatting working-directory: . run: cargo fmt --check --all - name: Rust Clippy working-directory: . run: cargo clippy --workspace -- -D warnings - name: Install frontend dependencies working-directory: desktop run: pnpm install --frozen-lockfile - name: TypeScript type check working-directory: desktop run: pnpm tsc --noEmit test: name: Test runs-on: windows-latest needs: lint steps: - uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 9 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm cache-dependency-path: desktop/pnpm-lock.yaml - name: Cache Cargo uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- - name: Run Rust tests working-directory: . run: cargo test --workspace - name: Install frontend dependencies working-directory: desktop run: pnpm install --frozen-lockfile - name: Run frontend unit tests working-directory: desktop run: pnpm vitest run build: name: Build runs-on: windows-latest needs: test steps: - uses: actions/checkout@v4 - name: Install Rust uses: dtolnay/rust-toolchain@stable - name: Install pnpm uses: pnpm/action-setup@v4 with: version: 9 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: 22 cache: pnpm cache-dependency-path: desktop/pnpm-lock.yaml - name: Cache Cargo uses: actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: ${{ runner.os }}-cargo- - name: Rust release build working-directory: . run: cargo build --release --workspace - name: Install frontend dependencies working-directory: desktop run: pnpm install --frozen-lockfile - name: Frontend production build working-directory: desktop run: pnpm build