-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (45 loc) · 1.23 KB
/
Copy pathpost-build.yml
File metadata and controls
55 lines (45 loc) · 1.23 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
49
50
51
52
53
54
55
name: Post Build
on:
workflow_run:
workflows: ["Build"]
types: [completed]
jobs:
downstream:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
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"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev,docs]"
- name: Compile Python
run: |
python -m compileall src
- name: Ruff Check
run: |
ruff check src
- name: Ruff Format Check
run: |
ruff format --check src
- name: Run Tests
env:
PYTHONWARNINGS: default
run: |
python -m pytest -q
- name: Start PyPNM
run: |
python -m uvicorn pypnm.api.main:app --host 127.0.0.1 --port 8000 &
for attempt in {1..20}; do
if curl -fsS http://127.0.0.1:8000/health >/dev/null; then
break
fi
sleep 1
done
curl -fsS http://127.0.0.1:8000/health
pkill -f "uvicorn pypnm.api.main:app"