Add CI test

This commit is contained in:
Luc Perkins 2024-05-23 15:37:34 -03:00
parent eb897bb16b
commit 0c1dd1090d
No known key found for this signature in database
GPG key ID: 16DB1108FB591835
3 changed files with 51 additions and 0 deletions

View file

@ -20,3 +20,6 @@ jobs:
uses: ./. uses: ./.
with: with:
_internal-strict-mode: true _internal-strict-mode: true
flake-dirs: |
.
test/subflake

25
test/subflake/flake.lock Normal file
View file

@ -0,0 +1,25 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1716330097,
"narHash": "sha256-8BO3B7e3BiyIDsaKA0tY8O88rClYRTjvAp66y+VBUeU=",
"rev": "5710852ba686cc1fd0d3b8e22b3117d43ba374c2",
"revCount": 629726,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.629726%2Brev-5710852ba686cc1fd0d3b8e22b3117d43ba374c2/018fa276-eb5e-762d-b67b-85f281987019/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

23
test/subflake/flake.nix Normal file
View file

@ -0,0 +1,23 @@
# Used for testing the flake-dirs parameter
{
description = "update-flake-lock test sub-flake";
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "aarch64-linux" "x86_64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
ponysay
];
};
});
};
}