-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.57 KB
/
Copy pathci.yml
File metadata and controls
55 lines (46 loc) · 1.57 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: CI
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: pipx install poetry
- name: Install dependencies
run: poetry install --no-interaction --all-extras
- name: Lint (ruff)
run: poetry run ruff check .
- name: Run tests
run: poetry run pytest -q
- name: Build & clean-install smoke test
run: |
poetry build
python - <<'PY'
import glob
import zipfile
wheels = glob.glob("dist/*.whl")
assert len(wheels) == 1, wheels
assert wheels[0].endswith("-py3-none-any.whl"), wheels[0]
with zipfile.ZipFile(wheels[0]) as wheel:
names = set(wheel.namelist())
assert "icons/emoji/dove.png" in names
wheel_meta = wheel.read(next(n for n in names if n.endswith(".dist-info/WHEEL"))).decode()
assert "Root-Is-Purelib: true" in wheel_meta
PY
python -m venv /tmp/smoke
/tmp/smoke/bin/pip install dist/*.whl
mkdir -p /tmp/smoke-run && cd /tmp/smoke-run
printf 'Name,Dove,Eagle,Owl,Peacock,Note\nA,10,5,3,8,D/P\nB,2,12,9,1,E/O\n' > d.csv
/tmp/smoke/bin/dope-plot --data d.csv --graph scatter radar
test -f charts/scatter_all.png