Skip to content

Commit 94c53c5

Browse files
committed
ci: run golangci-lint as a flake check instead of github workflow
Signed-off-by: Brian McGee <[email protected]>
1 parent 10a4616 commit 94c53c5

File tree

3 files changed

+18
-25
lines changed

3 files changed

+18
-25
lines changed

.github/workflows/golangci-lint.yml

-24
This file was deleted.

nix/packages/docs.nix

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
{ pkgs, perSystem, ... }:
1+
{
2+
pkgs,
3+
perSystem,
4+
...
5+
}:
26
pkgs.stdenvNoCC.mkDerivation {
37
name = "docs";
48

nix/packages/treefmt/default.nix

+13
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,19 @@ in
6363
git config --global user.name "Treefmt Test"
6464
'';
6565

66+
passthru.tests = {
67+
golangci-lint = perSystem.self.treefmt.overrideAttrs (old: {
68+
nativeBuildInputs = old.nativeBuildInputs ++ [pkgs.golangci-lint];
69+
buildPhase = ''
70+
HOME=$TMPDIR
71+
golangci-lint run
72+
'';
73+
installPhase = ''
74+
touch $out
75+
'';
76+
});
77+
};
78+
6679
meta = with lib; {
6780
description = "treefmt: one CLI to format your repo";
6881
homepage = "https://github.com/numtide/treefmt";

0 commit comments

Comments
 (0)