diff options
| author | Isabel <[email protected]> | 2024-05-20 09:24:10 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-05-20 04:24:10 -0400 |
| commit | 842c3f225677aa55e44b94342f19c8f3e6f2be06 (patch) | |
| tree | be0778636525c44bdc95d9ab30ff1db665e2fe1f | |
| parent | 02b9296c2228592ec67884df11aee76d1e2aa811 (diff) | |
feat: add prettier check (#1)
* feat: prettier check
* chore: use prettier to format ci file
| -rw-r--r-- | .github/workflows/ci.yaml | 10 | ||||
| -rw-r--r-- | checks/prettier/package.nix | 11 |
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 +'' |
