Skip to content

Foundation: Python ≥3.10 + UV + dependency-groups #665

Foundation: Python ≥3.10 + UV + dependency-groups

Foundation: Python ≥3.10 + UV + dependency-groups #665

Workflow file for this run

name: PR Tests
on: [pull_request]
jobs:
build:
env:
SPEASY_AMDA_USERNAME: ${{ secrets.SPEASY_AMDA_USERNAME }}
SPEASY_AMDA_PASSWORD: ${{ secrets.SPEASY_AMDA_PASSWORD }}
SPEASY_CORE_DISABLED_PROVIDERS: "cdpp3dview"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
max-parallel: 2
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: add test logins
uses: extractions/netrc@v3
with:
machine: authenticationtest.com
username: user
password: pass
- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install dependencies
run: uv sync --group dev --group docs
- name: Lint with flake8
run: |
uv run --with flake8 flake8 speasy tests --count --select=E9,F63,F7,F82 --show-source --statistics
uv run --with flake8 flake8 speasy tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
if: matrix.python-version != '3.10' || matrix.os != 'ubuntu-latest'
env:
SPEASY_CORE_HTTP_REWRITE_RULES: '{"https://thisserver_does_not_exists.lpp.polytechnique.fr/pub/":"http://sciqlop.lpp.polytechnique.fr/cdaweb-data/pub/"}'
run: uv run pytest
- name: Test with pytest (coverage + long tests)
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
env:
SPEASY_AMDA_MAX_CHUNK_SIZE_DAYS: "25"
SPEASY_LONG_TESTS: ""
SPEASY_INVENTORY_TESTS: ""
SPEASY_CORE_HTTP_REWRITE_RULES: '{"https://thisserver_does_not_exists.lpp.polytechnique.fr/pub/":"http://sciqlop.lpp.polytechnique.fr/cdaweb-data/pub/"}'
SPEASY_CORE_HTTP_USER_AGENT: "speasy-test-github-actions"
SPEASY_CORE_DISABLED_PROVIDERS: ""
run: |
sudo apt update && sudo apt install -y texlive pandoc
uv run pytest --cov=./ -cov-config=.coveragerc --cov-report=xml
make doctest
- name: Check that release process is not broken
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
run: |
uv run --with build --with wheel --with twine python -m build .
uv run --with twine twine check dist/*
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false