summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yaml10
-rw-r--r--checks/prettier/package.nix11
2 files changed, 16 insertions, 5 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 63363e6..30ed686 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -3,13 +3,13 @@ name: CI
on:
push:
paths:
- - '.github/workflows/**'
- - '**.nix'
+ - ".github/workflows/**"
+ - "**.nix"
branches: [main]
pull_request:
paths:
- - '.github/workflows/**'
- - '**.nix'
+ - ".github/workflows/**"
+ - "**.nix"
workflow_dispatch:
jobs:
@@ -25,7 +25,7 @@ jobs:
- name: Install Nix
uses: cachix/install-nix-action@V27
- - name: Build release.nix
+ - name: Build release.nix
run: |
nix flake check ./test \
--print-build-logs \
diff --git a/checks/prettier/package.nix b/checks/prettier/package.nix
new file mode 100644
index 0000000..03be49c
--- /dev/null
+++ b/checks/prettier/package.nix
@@ -0,0 +1,11 @@
+{
+ lib,
+ runCommand,
+ root,
+ nodePackages,
+}:
+runCommand "check-prettier" {} ''
+ cd ${root}
+ ${lib.getExe nodePackages.prettier} --ignore-path '.git' --check .
+ touch $out
+''