Commit 99a3046
authored
ci: gate staging on extension tests (+ build-time caching) (#205)
* ci: gate staging build/deploy on extension test suite
Re-adds the CKAN extension tests that died with the Jenkins pipeline,
now as a 'test' job in build-deploy.yml that build/deploy depend on.
Brings up the docker-compose dev stack (the same flow the old
ci_setup.sh/ci_test.sh drove via adx) on pinned submodule commits and
runs the 5 Fjelltopp suites:
unaids, validation, scheming, dhis2harvester, emailasusername
Gate semantics:
- push: tests must pass before build and deploy run
- redeploy (workflow_dispatch + image_tag): tests skipped, image
already tested when built
- test failure blocks both build and deploy
Tests run against the dev image + bind-mounted submodules, matching
local 'adx test'. Not yet verified green under CKAN 2.11/Py3.10.
* ci: run tests on PRs + cache pipenv venv and React node_modules
- Add pull_request trigger so the extension-test job runs as a visible
status check; build/deploy stay gated off pull_request events.
- Cache .adxvenv on Pipfile.lock — the dominant cost is bootstrap's
'pipenv sync --dev' (CKAN + ~19 extensions), not the image build.
- Cache the unaids React node_modules on its yarn.lock.
Both caches are safe on miss, so the first run is a clean cold signal.
* ci: run all suites (no fail-fast) and save caches on failure
- Run all 5 extension suites and aggregate, so one run reports the full
picture instead of stopping at the first failing suite.
- Split cache restore/save so .adxvenv and node_modules are saved even
when tests fail, making triage runs warm instead of cold.
* test: fix extension test suite under CKAN 2.11/Py3.10
- Add 'mock' and 'pyfakefs' to dev-packages: ckanext-validation,
-scheming and -emailasusername import the standalone 'mock' package
(and pyfakefs in validation), which weren't installed, causing
pytest collection errors. Dev-only — prod uses 'pipenv sync' without
--dev, so these don't ship.
- run_tests: blank CKAN_SMTP_SERVER for test runs so suites never reach
the dev stack's smtp4dev. Fixes ckanext-unaids'
test_send_dataset_transfer_emails_errors, which asserts mail sending
fails when no server is configured.
* deps: pin frictionless==5.13.1 and pyfakefs==4.6.* to match extensions
The validation/unaids extensions pin frictionless[ckan]==5.13.1 and
pyfakefs==4.6.* in their own requirements and pass their own CI against
those. Our merged Pipfile had frictionless>=5.0.0,<6.0.0 (drifted to a
newer 5.x that dropped Resource.__create__) and pyfakefs=* (6.x dropped
the CreateFile API), so ckanext-validation's test suite failed in our
stack only. Aligning the pins fixes it without touching the submodule;
frictionless is prod-facing but this matches the version the extensions
are built and tested against.1 parent 62a3ae8 commit 99a3046
4 files changed
Lines changed: 188 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
21 | 25 | | |
22 | 26 | | |
23 | 27 | | |
24 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
27 | 146 | | |
28 | 147 | | |
29 | 148 | | |
| |||
61 | 180 | | |
62 | 181 | | |
63 | 182 | | |
64 | | - | |
65 | | - | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
66 | 192 | | |
67 | 193 | | |
68 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
165 | 169 | | |
| 170 | + | |
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
| |||
0 commit comments