nixos-mailserver/.gitlab-ci.yml
Antoine Eiche a53aa5ac9a Use Niv to pin nixpkgs releases
Before using Niv, we were following channels meaning we can not
reproduce CI jobs easily.

In this change, we use Niv to pin these dependencies. We are also
addding a tests/default.nix to be able to run these tests locally.

For instance, to run the test extern.nix on the nixpkgs-19.09 release:

    nix-build tests/default.nix -A extern.nixpkgs_19_09

Fixes #178
2020-04-19 10:01:57 +02:00

47 lines
950 B
YAML

.template:
image: nixos/nix
retry: 2
before_script:
# report CPU info so we can monitor if real KVM becomes available. create /dev/kvm to fool nix
- cat /proc/cpuinfo
- ls -l /dev/kvm || true
- touch /dev/kvm
script:
- nix-build tests/default.nix -A ${SUITE}.${VERSION} --arg nonKVM true
19-09-intern:
extends: .template
variables:
VERSION: "nixpkgs_19_09"
SUITE: "intern"
19-09-extern:
extends: .template
variables:
VERSION: "nixpkgs_19_09"
SUITE: "extern"
19-09-clamav:
extends: .template
variables:
VERSION: "nixpkgs_19_09"
SUITE: "clamav"
unstable-intern:
extends: .template
variables:
VERSION: "nixpkgs_unstable"
SUITE: "intern"
nixpkgs_unstable-extern:
extends: .template
variables:
VERSION: "nixpkgs_unstable"
SUITE: "extern"
nixpkgs_unstable-clamav:
extends: .template
variables:
VERSION: "nixpkgs_unstable"
SUITE: "clamav"