krz/hutch-notify
Notification server for Hutch.
clone: git clone https://gitbay.org/krz/hutch-notify.git
main: .github/workflows/test.yml · raw
1name: Test
2
3# There is no test suite here yet, so this is the next most useful thing: prove
4# the service still installs from its lockfile and that every module imports.
5# That catches a broken import, a dependency dropped from pyproject, and a
6# settings field added without a default — the failures that would otherwise
7# surface as a container that will not start.
8on:
9 pull_request:
10 push:
11 branches: [main]
12
13permissions:
14 contents: read
15
16jobs:
17 import:
18 runs-on: ubuntu-latest
19 steps:
20 - uses: actions/checkout@v7
21
22 - uses: astral-sh/setup-uv@v10.0.1
23 with:
24 enable-cache: true
25
26 # --locked, not --frozen: --frozen installs from the lockfile without
27 # consulting pyproject.toml, so a manifest that has drifted past its lock
28 # installs happily and CI stays green.
29 - name: Install
30 run: uv sync --locked
31
32 # Settings are validated at import, and several fields have no default, so
33 # the values below stand in for real ones. They are deliberately obvious
34 # rubbish: this proves the modules load, not that the service is
35 # configured.
36 - name: Modules import
37 env:
38 APNS_KEY_ID: ci
39 APNS_TEAM_ID: ci
40 APNS_BUNDLE_ID: ci
41 APNS_PRIVATE_KEY_PATH: /dev/null
42 SRHT_TOKEN: ci
43 run: |
44 uv run python -c "
45 import app.main, app.config, app.db, app.models
46 import app.crud, app.poller, app.jobs, app.apns
47 print('all modules imported')
48 "