-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (41 loc) · 1.37 KB
/
ci.yml
File metadata and controls
52 lines (41 loc) · 1.37 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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
permissions:
contents: read
env:
FORCE_COLOR: 1
jobs:
test:
strategy:
fail-fast: false
matrix:
python: ["3.7", "3.13"]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Set up uv
uses: astral-sh/setup-uv@v1
with:
version: "0.4.20"
- name: Test script with `uv run`
run: |
uv run src/promdens/promdens.py --help
uv run src/promdens/promdens.py --plot --omega 0.2 --fwhm 5.0 -lch 0.001 -ns 3 -eu "eV" --npsamples 5 tests/test_data.txt
uv run src/promdens/promdens.py --plot --method=pdaw -lch 0.001 --omega 0.2 --fwhm 5.0 -ns 3 -eu "eV" --npsamples 5 tests/test_data.txt
- name: Install package
run: uv pip install --system -e .[tests]
- name: Run unit tests
run: pytest -v
- name: Run smoke tests from installed package
run: |
promdens --help
promdens --plot --omega 0.2 --fwhm 5.0 -lch 0.001 -ns 3 -eu "eV" --npsamples 5 tests/test_data.txt
promdens --plot --method=pdaw -lch 0.001 --omega 0.2 --fwhm 5.0 -ns 3 -eu "eV" --npsamples 5 tests/test_data.txt
python supplementary/envelopes_analysis/field_envelopes.py