From 0f17dbc4bbef8a25d1f4e35de9278d91bf228270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 19 Jul 2020 23:34:01 +0100 Subject: [PATCH] tests: add golangci-lint --- .github/workflows/test.yml | 3 +++ shell.nix | 1 + 2 files changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e007430..5d4f066 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,6 +24,9 @@ jobs: signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - name: Show nixpkgs version run: nix-instantiate --eval -E '(import {}).lib.version' + - name: Run golangci-lint + run: nix-shell --pure --run "golangci-lint run" + if: matrix.nixPath == 'nixpkgs=channel:nixpkgs-unstable' - name: Build nix packages run: nix run nixpkgs.nix-build-uncached -c nix-build-uncached default.nix - name: Add keys group (needed for go tests) diff --git a/shell.nix b/shell.nix index 7f1bda6..4438e14 100644 --- a/shell.nix +++ b/shell.nix @@ -7,6 +7,7 @@ pkgs.mkShell { gnupg utillinux nix + golangci-lint ]; # delve does not compile with hardening enabled hardeningDisable = [ "all" ];