From 17d633764394f70d07b0cceb0e2f7b9e27d45e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Qui=C3=B1ones?= Date: Fri, 7 Nov 2025 22:40:52 -0500 Subject: [PATCH] ci: improve code quality workflow (#159) --- .github/workflows/code-quality.yml | 35 ++++++++++++++++++++++++++++++ .github/workflows/style.yml | 16 -------------- 2 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/code-quality.yml delete mode 100644 .github/workflows/style.yml 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