mirror of
https://github.com/Mic92/sops-nix.git
synced 2026-05-12 10:55:56 +08:00
parallelize CI
This commit is contained in:
parent
5505789e4a
commit
c7826f534e
7 changed files with 87 additions and 23 deletions
39
default.nix
39
default.nix
|
|
@ -1,13 +1,44 @@
|
|||
{ pkgs ? import <nixpkgs> {} }: let
|
||||
vendorSha256 = "sha256-O0z+oEffOOZa/bn2gV9onLVbPBHsNDH2yq1CZPi8w58=";
|
||||
in rec {
|
||||
sops-init-gpg-key = pkgs.callPackage ./pkgs/sops-init-gpg-key {};
|
||||
|
||||
sops-install-secrets = pkgs.callPackage ./pkgs/sops-install-secrets {
|
||||
inherit vendorSha256;
|
||||
};
|
||||
sops-pgp-hook = pkgs.callPackage ./pkgs/sops-pgp-hook {};
|
||||
in rec {
|
||||
sops-init-gpg-key = pkgs.callPackage ./pkgs/sops-init-gpg-key {};
|
||||
sops-pgp-hook = pkgs.callPackage ./pkgs/sops-pgp-hook { };
|
||||
inherit sops-install-secrets;
|
||||
|
||||
ssh-to-pgp = pkgs.callPackage ./pkgs/ssh-to-pgp {
|
||||
inherit vendorSha256;
|
||||
};
|
||||
}
|
||||
|
||||
inherit (sops-install-secrets);
|
||||
|
||||
# used in the CI only
|
||||
sops-pgp-hook-test = pkgs.buildGoModule {
|
||||
name = "sops-pgp-hook-test";
|
||||
src = ./.;
|
||||
inherit vendorSha256;
|
||||
buildPhase = ''
|
||||
go test -c ./pkgs/sops-pgp-hook
|
||||
install -D sops-pgp-hook.test $out/bin/sops-pgp-hook.test
|
||||
'';
|
||||
};
|
||||
|
||||
unit-tests = pkgs.callPackage ./unit-tests.nix {};
|
||||
|
||||
lint = ssh-to-pgp.overrideAttrs (old: {
|
||||
name = "golangci-lint";
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.golangci-lint ];
|
||||
buildPhase = ''
|
||||
HOME=$TMPDIR golangci-lint run
|
||||
'';
|
||||
installPhase = ''
|
||||
touch $out
|
||||
'';
|
||||
fixupPhase = ":";
|
||||
});
|
||||
|
||||
# integration tests
|
||||
} // pkgs.lib.optionalAttrs (pkgs.stdenv.isLinux) sops-install-secrets.tests
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue