gestioCOF/workflows/migrations-check.nix
Tom Hubrecht 7a671104e8
All checks were successful
Check for missing migrations / migrations_check (pull_request) Successful in 1m12s
feat(nix): Begin adding actions
2025-01-12 10:56:53 +01:00

40 lines
769 B
Nix

{ 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";
steps =
[
(nix-actions.steps.checkout { })
{
name = "Setup dev secrets...";
run = # bash
"cp gestioasso/settings/secret_example.py gestioasso/settings/secret.py";
}
]
++ builtins.map (app: {
name = "Check migration for the ${app} django app";
run = ''nix-shell --run "python manage.py makemigrations --dry-run --check ${app}"'';
}) apps;
};
}