summaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/ci.yaml')
-rw-r--r--.github/workflows/ci.yaml65
1 files changed, 32 insertions, 33 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index ef649d9..b77ed84 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -6,49 +6,48 @@ on:
jobs:
build:
- runs-on: "ubuntu-latest"
+ name: Build
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
+ runs-on: ubuntu-latest
- - name: Setup pnpm
- uses: pnpm/action-setup@v4
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v4
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: pnpm
- cache-dependency-path: pnpm-lock.yaml
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v13
- - name: Install dependencies
- run: pnpm install --frozen-lockfile
+ - name: Install Dependencies
+ run: nix develop .#ci --command pnpm install --frozen-lockfile
- name: Run build
- run: pnpm build
+ run: nix develop .#ci --command nrr build
+
+ treefmt:
+ name: Treefmt
- format:
- runs-on: "ubuntu-latest"
+ runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
+ - name: Checkout repository
+ uses: actions/checkout@v4
- - name: Setup pnpm
- uses: pnpm/action-setup@v4
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@v13
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: 20
- cache: pnpm
- cache-dependency-path: pnpm-lock.yaml
+ - name: Run checks
+ run: |
+ nix develop .#ci --command treefmt --fail-on-change
- - name: Install dependencies
- run: pnpm install --frozen-lockfile
+ release-gate:
+ name: CI Release gate
+ needs: [build, treefmt]
- - name: Run Prettier
- run: pnpm exec prettier --check .
+ if: always()
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Exit with error
+ if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
+ run: exit 1