mirror of
https://github.com/nlewo/nix2container.git
synced 2024-09-11 16:36:39 +03:00
Fix the CI...
This commit is contained in:
parent
3b0c0eebe4
commit
da9259ff63
5
.github/workflows/podman.yml
vendored
5
.github/workflows/podman.yml
vendored
@ -10,4 +10,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2.4.0
|
||||
- uses: cachix/install-nix-action@v15
|
||||
- run: nix run -L '.#tests.all'
|
||||
- run: |
|
||||
# See https://github.com/containers/podman/issues/5114#issuecomment-779406347
|
||||
rm -rf ~/.local/share/containers/
|
||||
nix run -L '.#tests.all'
|
||||
|
@ -17,6 +17,9 @@ nix2container.buildImage {
|
||||
# A user is required by nix
|
||||
# https://github.com/NixOS/nix/blob/9348f9291e5d9e4ba3c4347ea1b235640f54fd79/src/libutil/util.cc#L478
|
||||
"USER=nobody"
|
||||
# When running in podman on the GitHub CI, Nix fails to find the
|
||||
# user home dir for an unkonwn reason...
|
||||
"HOME=/"
|
||||
];
|
||||
};
|
||||
# This is to check store path in nested layers are also added to the
|
||||
|
@ -12,6 +12,9 @@ let
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ];
|
||||
then
|
||||
echo "image list"
|
||||
${pkgs.podman}/bin/podman image list
|
||||
echo ""
|
||||
echo "Actual output:"
|
||||
${pkgs.podman}/bin/podman run ${image.imageName}:${image.imageTag} ${command}
|
||||
echo
|
||||
@ -133,7 +136,10 @@ let
|
||||
};
|
||||
};
|
||||
all =
|
||||
let scripts = pkgs.lib.concatMapStringsSep "\n" (s: "${s}/bin/test-script") (builtins.attrValues tests);
|
||||
let scripts =
|
||||
pkgs.lib.concatStringsSep
|
||||
"\n"
|
||||
(pkgs.lib.mapAttrsToList (n: v: "echo Running test '${n}'\n${v}/bin/test-script") tests);
|
||||
in pkgs.writeScriptBin "all-test-scripts" ''
|
||||
set -e
|
||||
${scripts}
|
||||
|
Loading…
Reference in New Issue
Block a user