From 3aa62aea34608a7883d841a3f2369942188c425e Mon Sep 17 00:00:00 2001 From: Lucien Cartier-Tilet Date: Wed, 10 Dec 2025 01:32:52 +0100 Subject: [PATCH] chore(CI): adapt GitHub action to Nix environment --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58d9ce9..ef9fae3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,31 +4,37 @@ on: push jobs: ci: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest] - node: [22] + runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v6 - - name: Install pnpm - uses: pnpm/action-setup@v4 - - - name: Install node - uses: actions/setup-node@v6 + - name: Install Nix + uses: cachix/install-nix-action@v27 with: - node-version: ${{ matrix.node }} - cache: pnpm + nix_path: nixpkgs=channel:nixos-unstable - name: Install dependencies - run: pnpm install - - - name: Lint - run: pnpm run lint + run: | + nix develop --no-pure-eval --command pnpm install --frozen-lockfile - name: Typecheck - run: pnpm run typecheck + run: | + nix develop --no-pure-eval --command pnpm run typecheck + + - name: Lint + run: | + nix develop --no-pure-eval --command pnpm run lint + + - name: Check formatting + run: | + nix develop --no-pure-eval --command pnpm run format-check + + - name: Tests + run: | + nix develop --no-pure-eval --command pnpm run test + + - name: Build + run: | + nix develop --no-pure-eval --command pnpm run build