From a8981723bbe3de53c43e6bc6a282d0d28d238b68 Mon Sep 17 00:00:00 2001 From: Sam Nystrom Date: Tue, 18 Apr 2023 08:00:21 -0500 Subject: [PATCH] ci: add formatting check (#30) This will help enforce a consistent coding style. The formatter used is `nixpkgs-fmt`. --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..767fed0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,18 @@ +name: CI + +on: + - push + - pull_request + +jobs: + Check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: cachix/install-nix-action@v20 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + - name: Run formatter + run: nix run nixpkgs#nixpkgs-fmt . + - name: Check for changes + run: git diff --color=always --exit-code