Commit 27ed239
authored
feat: Add integration test workflow + Python 3.12 setuptools fix (#611)
* feat: Add GitHub Actions workflow to trigger IIAB integration tests
This workflow enables automated integration testing with Internet-in-a-Box (IIAB):
- Triggers on PR labeled 'test-iiab-integration'
- Triggers on merge to master
- Dispatches events to ascoderu/iiab-lokole-tests repository
- Posts test results back to PRs
Related to integration test suite at:
https://github.com/ascoderu/iiab-lokole-tests
* fix: Use pull_request_target to enable secrets access for labeled fork PRs
This implements the 'safe to test' pattern used by major OSS projects:
- Maintainers explicitly approve fork PRs by adding test-iiab-integration label
- pull_request_target runs in base repo context with access to secrets
- Safe because we don't checkout/execute PR code, only read metadata
- Enables integration testing for fork PRs after maintainer review
Fixes the workflow failure on fork PRs while maintaining security.
* chore: Remove trailing whitespace
* fix: add setuptools for Python 3.12+ compatibility
Python 3.12+ no longer includes setuptools by default, but flask-security
3.0.0 imports pkg_resources which requires it. This fixes the error:
ModuleNotFoundError: No module named 'pkg_resources'
* fix: pin setuptools <73 as newer versions removed pkg_resources
Setuptools 73+ removed pkg_resources module which is still required by
flask-security 3.0.0. Testing showed:
- setuptools 72.2.0: ✅ pkg_resources available (deprecated but works)
- setuptools 82.0.0: ❌ pkg_resources removed
Constraint: setuptools>=65.5.0,<73.0.0
* fix: Add setuptools constraint to requirements.txt for gunicorn compatibility
API server was crashing with 'ModuleNotFoundError: No module named pkg_resources'
because gunicorn requires pkg_resources from setuptools, but setuptools 73+
removed this module.
The constraint was already in requirements-webapp.txt for the client, but
requirements.txt (used by API/worker containers) was missing it, causing
the API container to fail on startup.
Root cause: docker/app/Dockerfile installs both requirements-webapp.txt AND
requirements.txt, but the latter lacked the setuptools constraint, allowing
pip to install setuptools 73+ which doesn't provide pkg_resources.
Fix: Add setuptools>=65.5.0,<73.0.0 to requirements.txt to ensure pkg_resources
is available for gunicorn in Python 3.9 API/worker containers.
Fixes: Integration test failures where API container exits with code 11 parent c3e892e commit 27ed239
File tree
3 files changed
+53
-0
lines changed- .github/workflows
3 files changed
+53
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
0 commit comments