diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 0000000..ddb77d6 --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,35 @@ +name: Code Quality Checks +on: [pull_request, push] + +jobs: + check-formatting: + name: "*.nix fmt check" + runs-on: ubuntu-latest + steps: + - name: Code checkout + uses: actions/checkout@v5 + + - name: Setup Alejandra CLI + uses: 0xc000022070/setup-alejandra@v4.0.0 + + - name: Check formatting + run: alejandra --check **/*.nix + + remove-dead-code: + name: Remove dead code + runs-on: ubuntu-latest + steps: + - name: Code checkout + uses: actions/checkout@v5 + + - name: Install Nix + uses: cachix/install-nix-action@v31 + + - name: Setup Cachix + uses: cachix/cachix-action@v16 + with: + name: deadnix + + - name: Run deadnix + run: | + nix run nixpkgs#deadnix -- --fail diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml deleted file mode 100644 index 9575e1b..0000000 --- a/.github/workflows/style.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Check *.nix files format -on: [pull_request, push] - -jobs: - check-formatting: - name: Check formatting - runs-on: ubuntu-latest - steps: - - name: Code checkout - uses: actions/checkout@v5 - - - name: Setup Alejandra CLI - uses: 0xc000022070/setup-alejandra@v4.0.0 - - - name: Check formatting - run: alejandra --check **/*.nix