Commit bbe928d
committed
fix(ci): test-backend can't resolve postgres service DNS on Gitea runner
The Gitea deploy workflow's test-backend job ran inside a container:
(gitea/runner-images:ubuntu-latest) and addressed the DB by its Docker
service name (POSTGRES_HOST: postgres). The Gitea act_runner does not
reliably wire up service-container DNS, so every test ERROR'd at setup
with "could not translate host name postgres to address: Temporary
failure in name resolution" — the autouse conftest migration fixture
(connects to settings.POSTGRES_HOST) failed before any test ran.
Fix: drop the container: block so the job runs directly on the runner
host, add ports: mappings to the postgres + redis services, and connect
via localhost — mirroring the proven .github/workflows/test.yml pattern.
If the job is ever moved back into a container:, revert POSTGRES_HOST to
'postgres' and drop the ports: (Docker service-name DNS resolves inside
a container job on runners that link services correctly).1 parent 56e2276 commit bbe928d
1 file changed
Lines changed: 12 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | 46 | | |
50 | 47 | | |
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
54 | 51 | | |
55 | 52 | | |
| 53 | + | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
| 62 | + | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
90 | | - | |
| 97 | + | |
91 | 98 | | |
92 | 99 | | |
93 | | - | |
| 100 | + | |
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
| |||
0 commit comments