CI test dev shell
This commit is contained in:
parent
8538c28f28
commit
7f4987dc85
1 changed files with 49 additions and 6 deletions
45
flake.nix
45
flake.nix
|
|
@ -70,13 +70,56 @@
|
|||
colmenaHive = colmena.lib.makeHive self.outputs.colmena;
|
||||
colmena = hosts;
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
devShells.${system} = {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
lazygit
|
||||
agenix.packages.${system}.agenix
|
||||
colmena.packages.${system}.colmena
|
||||
];
|
||||
};
|
||||
|
||||
# Shell for testing Forgejo Actions locally
|
||||
# Usage: nix develop .#ci-test
|
||||
ci-test = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
# Forgejo runner for exec command
|
||||
forgejo-runner
|
||||
|
||||
# Packages matching forgejo-runner.nix hostPackages
|
||||
bash
|
||||
coreutils
|
||||
curl
|
||||
gawk
|
||||
git
|
||||
gnused
|
||||
jq
|
||||
nix
|
||||
nodejs
|
||||
wget
|
||||
|
||||
# Additional packages from systemPackages
|
||||
colmena.packages.${system}.colmena
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
# Wrapper that runs on host by default (matching your runner config)
|
||||
ci() {
|
||||
forgejo-runner exec -i "-self-hosted" "$@"
|
||||
}
|
||||
|
||||
echo "🔧 Forgejo Actions test environment"
|
||||
echo ""
|
||||
echo "Usage: ci [options]"
|
||||
echo ""
|
||||
echo "Examples:"
|
||||
echo " ci --list -W .forgejo/workflows/ # List jobs"
|
||||
echo " ci -W .forgejo/workflows/auto-update.yaml -j check-updates # Run job"
|
||||
echo " ci -W .forgejo/workflows/auto-update.yaml -j check-updates -n # Dry run"
|
||||
echo " ci -W .forgejo/workflows/auto-update.yaml -j check-updates -d # Debug"
|
||||
echo ""
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue