From 8db15c78d7557b94310757684c842cefe199cb33 Mon Sep 17 00:00:00 2001 From: AxelSilverdew Date: Sun, 5 May 2024 19:04:26 +0530 Subject: [PATCH] ci: Added nixfmt and statix --- .github/workflows/code_check.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/code_check.yml diff --git a/.github/workflows/code_check.yml b/.github/workflows/code_check.yml new file mode 100644 index 0000000..e9a621b --- /dev/null +++ b/.github/workflows/code_check.yml @@ -0,0 +1,26 @@ +name: Code Check +on: + push: + branches: + - "*" + pull_request: + branches: + - "*" +jobs: + lint: + name: Run nixfmt and statix + runs-on: ubuntu-latest + steps: + - name: Check out the code + uses: actions/checkout@v4 + - name: Install Nix + uses: cachix/install-nix-action@v26 + - name: Install nixfmt and statix + run: | + nix profile install nixpkgs#nixfmt-rfc-style nixpkgs#statix + - name: Run nixfmt + run: | + nixfmt --check ./**/*.nix + - name: Run statix + run: | + statix check