-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.33 KB
/
Copy pathpython-tests.yml
File metadata and controls
48 lines (38 loc) · 1.33 KB
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
# Purpose: Run the local Python, manifest, Compose, and image checks in CI.
# Input/Output: Reads the repository at the pushed commit and publishes only test results.
# Invariants: No deployment, production secret, or remote Paperless access is required.
# Debugging: Re-run the first failed command locally from the repository root.
name: Python + Docker Tests
on:
pull_request:
push:
permissions:
contents: read
jobs:
test:
name: Python 3.12
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt pytest
- name: Compile Python sources
run: >-
python -m py_compile
src/*.py
custom_components/paperless_kiplus/*.py
tests/*.py
- name: Run unit and integration tests
run: python -m pytest -q
- name: Validate production Compose
run: docker compose -f docker/docker-compose.unraid-broker.yml config --quiet
- name: Build production worker image
run: docker build --file docker/Dockerfile --tag paperless-kiplus-worker:test .