name: Test # There is no test suite here yet, so this is the next most useful thing: prove # the service still installs from its lockfile and that every module imports. # That catches a broken import, a dependency dropped from pyproject, and a # settings field added without a default — the failures that would otherwise # surface as a container that will not start. on: pull_request: push: branches: [main] permissions: contents: read jobs: import: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: astral-sh/setup-uv@v10.0.1 with: enable-cache: true # --locked, not --frozen: --frozen installs from the lockfile without # consulting pyproject.toml, so a manifest that has drifted past its lock # installs happily and CI stays green. - name: Install run: uv sync --locked # Settings are validated at import, and several fields have no default, so # the values below stand in for real ones. They are deliberately obvious # rubbish: this proves the modules load, not that the service is # configured. - name: Modules import env: APNS_KEY_ID: ci APNS_TEAM_ID: ci APNS_BUNDLE_ID: ci APNS_PRIVATE_KEY_PATH: /dev/null SRHT_TOKEN: ci run: | uv run python -c " import app.main, app.config, app.db, app.models import app.crud, app.poller, app.jobs, app.apns print('all modules imported') "