ci/modules_test: use flake-enabled nix

This commit is contained in:
Erik Arvstedt 2022-08-27 13:34:39 +02:00
parent 81bf18b5ab
commit b625325487
No known key found for this signature in database
GPG Key ID: 33312B944DD97846
2 changed files with 6 additions and 9 deletions

View File

@ -7,11 +7,13 @@ task:
# Use the maximum timeout. Needed when rebuilding packages on a channel update.
timeout_in: 120m
container:
# Defined in https://github.com/nix-community/docker-nixpkgs
image: nixpkgs/nix-flakes:nixos-22.05
matrix:
- name: modules_test
container:
# Use Nix release 2.3.x, the default on NixOS stable
image: nixos/nix:2.3.12
# Besides virtualization, this also enables privileged containers which are required for
# sandboxed builds
kvm: true
@ -28,12 +30,9 @@ task:
# This script is run as root
build_script:
- echo "sandbox = true" >> /etc/nix/nix.conf
- export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs)"
- nix run -f '<nixpkgs>' bash coreutils cachix -c ./test/ci/build.sh
- nix shell --inputs-from . nixpkgs#{bash,coreutils,gawk,cachix} -c ./test/ci/build.sh
- name: flake
container:
image: nixpkgs/nix-flakes
build_script:
- nix flake check
- ./test/nixos-search/ci-test.sh

View File

@ -16,6 +16,4 @@ if [[ -v CIRRUS_CI ]]; then
chmod o+rw /dev/kvm
fi
echo "$NIX_PATH ($(nix eval --raw nixpkgs.lib.version))"
"${BASH_SOURCE[0]%/*}/../run-tests.sh" --ci --scenario $scenario
"${BASH_SOURCE[0]%/*}/../run-tests.sh" --ci --scenario "$scenario"