|
24 | 24 | git fetch --all --tags --prune |
25 | 25 | git branch -r --contains "${{ github.sha }}" | grep -q 'origin/dev' |
26 | 26 | git checkout --detach "${{ github.sha }}" |
27 | | - git rev-parse HEAD |
| 27 | + git reset --hard "${{ github.sha }}" |
| 28 | + test "$(git rev-parse HEAD)" = "${{ github.sha }}" |
| 29 | + if [ -n "$(git status --porcelain --untracked-files=no)" ]; then |
| 30 | + echo "Tracked working tree is dirty after reset" >&2 |
| 31 | + git status --short --untracked-files=no >&2 |
| 32 | + exit 1 |
| 33 | + fi |
28 | 34 |
|
29 | 35 | export IMAGE_TAG="${{ github.sha }}" |
30 | 36 |
|
|
69 | 75 | docker compose -f docker-compose.dev-ci.yml ps >&2 || true |
70 | 76 | exit 1 |
71 | 77 | fi |
72 | | - done && |
| 78 | + done |
| 79 | +
|
| 80 | + docker compose -f docker-compose.dev-ci.yml exec -T web python - <<'PY' |
| 81 | + import os |
| 82 | +
|
| 83 | + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "procollab.settings") |
| 84 | +
|
| 85 | + import django |
| 86 | +
|
| 87 | + django.setup() |
| 88 | +
|
| 89 | + from vacancy.serializers import ( |
| 90 | + ProjectVacancyCreateListSerializer, |
| 91 | + VacancyDetailSerializer, |
| 92 | + ) |
| 93 | +
|
| 94 | + create_fields = set(ProjectVacancyCreateListSerializer().fields.keys()) |
| 95 | + detail_fields = set(VacancyDetailSerializer().fields.keys()) |
| 96 | +
|
| 97 | + print("ProjectVacancyCreateListSerializer fields:", sorted(create_fields)) |
| 98 | + print("VacancyDetailSerializer fields:", sorted(detail_fields)) |
| 99 | +
|
| 100 | + if "city" not in create_fields: |
| 101 | + raise SystemExit("Runtime create serializer does not contain city") |
| 102 | +
|
| 103 | + if "city" not in detail_fields: |
| 104 | + raise SystemExit("Runtime detail serializer does not contain city") |
| 105 | + PY |
| 106 | +
|
| 107 | + docker compose -f docker-compose.dev-ci.yml exec -T web \ |
| 108 | + python manage.py showmigrations vacancy |
| 109 | +
|
| 110 | + docker compose -f docker-compose.dev-ci.yml exec -T web python - <<'PY' |
| 111 | + import os |
| 112 | +
|
| 113 | + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "procollab.settings") |
| 114 | +
|
| 115 | + import django |
| 116 | +
|
| 117 | + django.setup() |
| 118 | +
|
| 119 | + from django.db import connection |
| 120 | + from django.db.migrations.recorder import MigrationRecorder |
| 121 | +
|
| 122 | + applied = { |
| 123 | + (migration.app, migration.name) |
| 124 | + for migration in MigrationRecorder(connection).migration_qs |
| 125 | + } |
| 126 | +
|
| 127 | + if ("vacancy", "0010_vacancy_city") not in applied: |
| 128 | + raise SystemExit("vacancy.0010_vacancy_city is not applied") |
| 129 | +
|
| 130 | + print("vacancy.0010_vacancy_city applied") |
| 131 | + PY |
| 132 | +
|
| 133 | + docker compose -f docker-compose.dev-ci.yml exec -T web \ |
| 134 | + grep -n '"city"' /procollab/vacancy/serializers.py |
73 | 135 |
|
74 | 136 | install -d /etc/nginx/procollab/includes && |
75 | 137 | install -m 644 deploy/nginx/host/includes/proxy_app.inc /etc/nginx/procollab/includes/proxy_app.inc && |
|
0 commit comments