TL: adding pypi link #57
This file contains 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: CI pipeline for qmat | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
jobs: | |
test-code: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ['3.8', '3.9', '3.10', '3.11', '3.12'] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "${{ matrix.python }}" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[test] | |
- name: Lint with flake8 | |
run: | | |
# stop if there are Python syntax errors or undefined names | |
flake8 ./qmat ./tests --count --select=E9,F63,F7,F82 --show-source --statistics | |
- name: Run pytest with coverage | |
run: | | |
./test.sh | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
if: github.repository_owner == 'Parallel-in-Time' && matrix.python == '3.11' | |
with: | |
flags: smart-tests | |
verbose: true | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
test-tutorials: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[test] | |
- name: Test with pytest-notebook | |
run: | | |
pytest ./docs/notebooks --nb-test-files -v | |