Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: run golangci-lint as a flake check instead of github workflow #469

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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];
brianmcgee marked this conversation as resolved.
Show resolved Hide resolved
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