chore(CI): adapt GitHub action to Nix environment
This commit is contained in:
42
.github/workflows/ci.yml
vendored
42
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user