Re-inserting the gallery to the docs (#784) #856
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
# This workflow installs the package on several OS/Python versions and runs the tests | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: pytest | |
on: | |
push: | |
branches: [ 'main' ] | |
pull_request: | |
branches: [ '**' ] | |
jobs: | |
pytest: | |
strategy: | |
matrix: | |
os: | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
python-version: | |
- '3.10' | |
- '3.11' | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }} py${{ matrix.python-version }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies and package | |
run: pip install .[tests,optional_plotting,optional_io_formats,tutorials] | |
- name: Test with pytest | |
if: ${{ matrix.python-version != '3.10' }} | |
run: pytest tests | |
# only execute Matplotlib tests & CodeCov on latest Python version | |
- name: Test with pytest including Matplotlib & Codecov | |
if: ${{ matrix.python-version == '3.10' }} | |
run: pytest tests --mpl --cov=./ --cov-report=xml | |
- name: Upload coverage report to Codecov | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' }} | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml | |
env_vars: ${{ matrix.os }} py${{ matrix.python-version }} |