39 lines
742 B
Nix
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}"'';
|
|
}
|
|
];
|
|
};
|
|
}
|