Repository navigation
61 lines (56 loc) · 1.77 KB
/
Copy pathtests.yml
File metadata and controls
61 lines (56 loc) · 1.77 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
name: Tests
on:
push:
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python: ["3.11", "3.12", "3.13", "3.14"]
include:
- os: macos-latest
python: "3.14"
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python }}
cache: pip
- run: python -m pip install -e ".[test]"
- run: python -m pytest --cov=memory --cov-report=term-missing
package:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
- run: python -m pip install ".[test]" build twine ruff
- run: ruff check .
- run: ruff format --check .
- run: python -m build
- run: python -m twine check dist/*
- name: Test source distribution
run: |
python - <<'PY'
import subprocess
import sys
import tarfile
import tempfile
from pathlib import Path
with tempfile.TemporaryDirectory() as directory:
with tarfile.open(next(Path("dist").glob("*.tar.gz"))) as archive:
archive.extractall(directory, filter="data")
source = next(Path(directory).glob("*/pyproject.toml")).parent
subprocess.run([sys.executable, "-m", "pytest", "-q"], cwd=source, check=True)
PY
- run: python -m venv /tmp/wheel-check
- run: /tmp/wheel-check/bin/python -m pip install --no-deps dist/*.whl
- run: /tmp/wheel-check/bin/python -I examples/basic.py