Skip to content

Fixing maxchars for macos + update of github workflow #196

Fixing maxchars for macos + update of github workflow

Fixing maxchars for macos + update of github workflow #196

Workflow file for this run

name: testing
on:
push:
branches:
- develop
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.13'
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install uv
uv pip install --system .[msonable,tests,dev]
- name: Lint
run: pre-commit run --all-files --show-diff-on-failure
test:
strategy:
matrix:
config:
- { os: macos-latest, python: "3.9", resolution: lowest-direct }
- { os: ubuntu-latest, python: "3.9", resolution: lowest-direct }
- { os: ubuntu-latest, python: "3.9", resolution: highest }
- { os: ubuntu-latest, python: "3.10", resolution: highest }
- { os: ubuntu-latest, python: "3.11", resolution: highest }
- { os: ubuntu-latest, python: "3.12", resolution: highest }
- { os: ubuntu-latest, python: "3.13", resolution: highest }
- { os: ubuntu-latest, python: "3.14", resolution: lowest-direct }
- { os: macos-latest, python: "3.14", resolution: highest }
- { os: ubuntu-latest, python: "3.14", resolution: highest }
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install uv
uv pip install --system .[msonable,tests,docs] --resolution=${{ matrix.config.resolution }}
- name: Test
if: matrix.config.os == 'ubuntu-latest'
run: pytest --cov=qtoolkit --cov-report=xml
- name: Test macos (no integration)
if: matrix.config.os == 'macos-latest'
run: pytest --ignore=tests/integration --cov=qtoolkit --cov-report=xml
- name: Upload coverage to Codecov
if: matrix.config.os == 'ubuntu-latest' && matrix.config.python == '3.13' && matrix.config.resolution == 'highest'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: matgenix/qtoolkit
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.13'
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install -U pip
pip install uv
# Required to generate rst files from markdown
sudo apt install pandoc
uv pip install --system .[docs]
- name: Build Sphinx docs
working-directory: doc
run: |
# cannot use sphinx build directly as the makefile handles generation
# of some rst files
make html