Skip to content

Migrate to python 3.13 #9

Migrate to python 3.13

Migrate to python 3.13 #9

Workflow file for this run

name: PyPorfolioOpt Build Pipeline
on:
workflow_dispatch:
pull_request:
push:
branches: [ "master" ]
permissions:
contents: read
jobs:
linting:
name: "Linting | Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
env:
MPLBACKEND: Agg # https://github.com/orgs/community/discussions/26434
strategy:
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.12", "3.13" ]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install CI pipeline dependencies
run: pip install --upgrade -r requirements-dev.txt
- name: Install application dependencies
run: pip install -r requirements.txt
- name: Flake analysing
run: pflake8 --show-source --statistics .
- name: iSort analysing
run: isort --diff --check .
- name: Black analysing
run: black --diff --check .
- name: MyPy analysing
run: mypy pypfopt
test:
name: "Tests | Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
needs:
- linting
strategy:
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.12", "3.13" ]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install CI pipeline dependencies
run: pip install --upgrade -r requirements-dev.txt
- name: Install application dependencies
run: pip install -r requirements.txt
- name: Run Unit tests
run: |
pytest --version
pytest --doctest-modules --junitxml=tests-results-${{ matrix.python-version }}.xml \
--cov=. --cov-report=xml tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: tests-results-${{ matrix.python-version }}.xml
fail_ci_if_error: true