diff --git a/.github/workflows/build.yml b/.github/workflows/check.yml similarity index 79% rename from .github/workflows/build.yml rename to .github/workflows/check.yml index f26fb3f5..2162befd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/check.yml @@ -1,4 +1,4 @@ -name: Build +name: Check on: push: @@ -34,17 +34,17 @@ jobs: outputs: packages: ${{ steps.list-packages.outputs.packages }} - build: + check: needs: evaluate strategy: fail-fast: false matrix: - build: ${{ fromJSON(needs.evaluate.outputs.packages) }} + check: ${{ fromJSON(needs.evaluate.outputs.packages) }} - name: ${{ matrix.build.key }} on ${{ matrix.build.arch }} + name: ${{ matrix.check.key }} on ${{ matrix.check.arch }} - runs-on: ${{ matrix.build.os }} + runs-on: ${{ matrix.check.os }} steps: - name: Install Nix @@ -57,5 +57,5 @@ jobs: - name: Set up cache uses: DeterminateSystems/magic-nix-cache-action@main - - name: Build ${{ matrix.build.key }} - run: nix -L build github:${{ github.repository }}/${{ github.event.pull_request.head.sha || github.sha }}#${{ matrix.build.type }}.${{ matrix.build.arch }}.${{ matrix.build.key }} --no-update-lock-file + - name: Check ${{ matrix.check.key }} + run: nix -L check github:${{ github.repository }}/${{ github.event.pull_request.head.sha || github.sha }}#${{ matrix.check.type }}.${{ matrix.check.arch }}.${{ matrix.check.key }} --no-update-lock-file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 1a965610..00000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Lint - -on: pull_request - -permissions: - contents: read - -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - - steps: - - name: Install Nix - uses: DeterminateSystems/nix-installer-action@main - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - extra-conf: | - extra-experimental-features = nix-command flakes - - - name: Set up cache - uses: DeterminateSystems/magic-nix-cache-action@main - - - name: Install tools - run: | - flake='github:nixos/nixpkgs/e913ae340076bbb73d9f4d3d065c2bca7caafb16' - nix profile install "${flake}#statix" - nix profile install "${flake}#deadnix" - nix profile install "${flake}#jq" - - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Run statix - run: | - statix check --format json |\ - jq --raw-output '.file as $file | .report[] | .severity as $severity | .diagnostics[] | "::warning file=\($file),line=\(.at.from.line),col=\(.at.from.column)::\(.message)"' - - - name: Run deadnix - run: | - deadnix --no-lambda-arg --output-format json |\ - jq --raw-output '.file as $file | .results[] | "::warning file=\($file),line=\(.line),col=\(.column)::\(.message)"'