Fixing maxchars for macos + update of github workflow #192
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 .[strict,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 .[msonable,tests,docs] | |
| - 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: | | |
| # Required to generate rst files from markdown | |
| sudo apt install pandoc | |
| python -m pip install --upgrade pip | |
| pip install .[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 |