Skip to content

Change supported Python version #403

Change supported Python version

Change supported Python version #403

Workflow file for this run

name: Tests
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 lingam --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 lingam --count --exit-zero --ignore=E203,E501,E741,C901 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest -v --cov=lingam --cov-report=term-missing
build-and-install:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Build sdist & wheel via pyproject.toml
run: |
python -m venv venv_b
source venv_b/bin/activate
python -m pip install --upgrade pip setuptools wheel build
python -m build
ls -la dist/
echo "List sdist contents:"
tar -tf dist/*.tar.gz | head -n 50
- name: Test install from wheel
run: |
python -m venv venv_w
source venv_w/bin/activate
pip install --no-cache-dir dist/*.whl
python -c "import lingam; print(lingam.__version__)"
pip check
- name: Test install from sdist
run: |
python -m venv venv_s
source venv_s/bin/activate
pip install --no-cache-dir dist/*.tar.gz
python -c "import lingam; print(lingam.__version__)"
pip check