Skip to content

Commit

Permalink
ci: run golangci-lint as a flake check instead of github workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Brian McGee <[email protected]>
  • Loading branch information
brianmcgee committed Nov 6, 2024
1 parent 7c42707 commit 98854b0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 25 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/golangci-lint.yml

This file was deleted.

6 changes: 5 additions & 1 deletion nix/packages/docs.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{ pkgs, perSystem, ... }:
{
pkgs,
perSystem,
...
}:
pkgs.stdenvNoCC.mkDerivation {
name = "docs";

Expand Down
13 changes: 13 additions & 0 deletions nix/packages/treefmt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 98854b0

Please sign in to comment.