gestioCOF/workflows/migrations-check.nix

40 lines
742 B
Nix
Raw Normal View History

2025-01-12 10:51:21 +01:00
{ nix-actions, ... }:
let
apps = [
"bda"
"bds"
"clubs"
"cofcms"
"events"
"gestioncof"
"kfet"
"kfetauth"
"kfetcms"
"open"
"petitscours"
"shared"
];
in
{
name = "Check for missing migrations";
on = [ "pull_request" ];
jobs.migrations_check = {
runs-on = "nix";
2025-01-12 11:24:20 +01:00
steps = [
(nix-actions.steps.checkout { })
{
name = "Setup dev secrets...";
run = # bash
"cp gestioasso/settings/secret_example.py gestioasso/settings/secret.py";
}
{
name = "Check that all migrations exist";
run = ''nix-shell --run "python manage.py makemigrations --dry-run --check ${builtins.concatStringsSep " " apps}"'';
}
];
2025-01-12 10:51:21 +01:00
};
}