gestioCOF/workflows/migrations-check.nix
Tom Hubrecht 0c1af65228
All checks were successful
Run pre-commit on all files / pre-commit (pull_request) Successful in 19s
Check for missing migrations / migrations_check (pull_request) Successful in 23s
Run pre-commit on all files / pre-commit (push) Successful in 42s
chore: Run all the check in one step
2025-01-12 11:24:20 +01:00

39 lines
742 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";
}
{
name = "Check that all migrations exist";
run = ''nix-shell --run "python manage.py makemigrations --dry-run --check ${builtins.concatStringsSep " " apps}"'';
}
];
};
}