diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml deleted file mode 100644 index 0eac7f5b..00000000 --- a/.github/workflows/golangci-lint.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: golangci-lint - -on: - push: - tags: - - v* - branches: - - main - pull_request: - -permissions: - contents: read - -jobs: - golangci: - name: lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - version: v1.61.0 - args: --timeout=2m diff --git a/nix/packages/docs.nix b/nix/packages/docs.nix index 441b171f..4071574c 100644 --- a/nix/packages/docs.nix +++ b/nix/packages/docs.nix @@ -1,4 +1,8 @@ -{ pkgs, perSystem, ... }: +{ + pkgs, + perSystem, + ... +}: pkgs.stdenvNoCC.mkDerivation { name = "docs"; diff --git a/nix/packages/treefmt/default.nix b/nix/packages/treefmt/default.nix index 22dd6155..7f6a8d0b 100644 --- a/nix/packages/treefmt/default.nix +++ b/nix/packages/treefmt/default.nix @@ -63,6 +63,19 @@ in git config --global user.name "Treefmt Test" ''; + passthru.tests = { + golangci-lint = perSystem.self.treefmt.overrideAttrs (old: { + nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.golangci-lint]; + buildPhase = '' + HOME=$TMPDIR + golangci-lint run + ''; + installPhase = '' + touch $out + ''; + }); + }; + meta = with lib; { description = "treefmt: one CLI to format your repo"; homepage = "https://github.com/numtide/treefmt";