-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (94 loc) · 3.45 KB
/
python-package.yml
File metadata and controls
106 lines (94 loc) · 3.45 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Python Package
on:
push:
branches: [main, develop]
paths:
- "stem_ai/**"
- "pyproject.toml"
- "README.md"
- ".github/workflows/python-package.yml"
pull_request:
branches: [main]
paths:
- "stem_ai/**"
- "pyproject.toml"
- "README.md"
- ".github/workflows/python-package.yml"
jobs:
package-smoke:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install package with PDF extra
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[pdf]"
- name: Compile package
run: |
python -m py_compile stem_ai/cli.py stem_ai/scanner.py stem_ai/render.py stem_ai/app.py
- name: CLI help smoke test
run: |
stem --help
python -m stem_ai --help
- name: Create synthetic bio repository
run: |
mkdir -p /tmp/stem-target/.github/workflows /tmp/stem-target/tests
cat > /tmp/stem-target/README.md <<'EOF'
# Synthetic Viral Sequencing Pipeline
Research-use-only viral sequencing workflow.
Not for clinical use. Not for diagnostic use.
EOF
cat > /tmp/stem-target/requirements.txt <<'EOF'
biopython==1.83
EOF
cat > /tmp/stem-target/tests/test_pipeline.py <<'EOF'
def test_pipeline_smoke():
assert True
EOF
cat > /tmp/stem-target/.github/workflows/ci.yml <<'EOF'
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: python -m pytest
EOF
- name: Run Level 1/2/3 CLI scans
run: |
stem /tmp/stem-target --level 1 --format all --out /tmp/stem-output-l1
stem /tmp/stem-target --level 2 --format all --out /tmp/stem-output-l2
stem /tmp/stem-target --level 3 --format all --out /tmp/stem-output-l3
- name: Verify generated artifacts
run: |
find /tmp/stem-output-l1 -maxdepth 1 -type f | sort
find /tmp/stem-output-l2 -maxdepth 1 -type f | sort
find /tmp/stem-output-l3 -maxdepth 1 -type f | sort
test -f /tmp/stem-output-l1/stem-target_experiment_results.json
test -f /tmp/stem-output-l1/stem-target_report.md
test -f /tmp/stem-output-l1/stem-target_report.html
test -f /tmp/stem-output-l1/stem-target_brief_1p.pdf
test -f /tmp/stem-output-l2/stem-target_experiment_results.json
test -f /tmp/stem-output-l2/stem-target_report.md
test -f /tmp/stem-output-l2/stem-target_report.html
test -f /tmp/stem-output-l2/stem-target_detailed_5p.pdf
test -f /tmp/stem-output-l3/stem-target_experiment_results.json
test -f /tmp/stem-output-l3/stem-target_report.md
test -f /tmp/stem-output-l3/stem-target_report.html
test -f /tmp/stem-output-l3/stem-target_detailed_7p.pdf
- name: Build source and wheel distributions
run: |
python -m pip install build
python -m build