forked from atomsforhumanity/qcdata
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.49 KB
/
Copy pathtest.yaml
File metadata and controls
51 lines (42 loc) · 1.49 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
name: Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
include:
- python-version: "3.12"
coverage: true
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
# uv pip resolves & installs deps like pip (not an environment sync)
- name: Install package + test deps (uv pip)
run: uv pip install --system --group dev .
- name: Run tests
run: python -m pytest --cov-report=term-missing --cov-report html:htmlcov --cov-config=pyproject.toml --cov=qcdata --cov=tests .
- name: Upload coverage HTML
if: ${{ matrix.coverage == true }}
uses: actions/upload-artifact@v4
with:
name: htmlcov-py${{ matrix.python-version }}
path: htmlcov
# To catch manifest issues, we build and install from sdist on one version
- name: Build sdist (only on 3.12)
if: ${{ matrix.coverage == true }}
run: python -m pip install build && python -m build --sdist
- name: Install from sdist (only on 3.12)
if: ${{ matrix.coverage == true }}
run: python -m pip install dist/*.tar.gz