pytest for plotting components (#1434) #2952
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: tests | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
pull_request: | |
branches: | |
- main | |
- develop | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build: | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.8", "3.10"] | |
env: | |
POETRY_VIRTUALENVS_CREATE: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Install dependencies | |
run: poetry install --with=tests | |
- name: Pytest | |
run: poetry run pytest tests -v --cov=./ --cov-report=xml | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
env_vars: OS,PYTHON | |
files: ./coverage.xml | |
name: Coverage Report with codecov overview | |
verbose: true | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: abatilo/actions-poetry@v2 | |
- name: Setup Pandoc | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Setup Requirements | |
run: poetry install --with=docs | |
- name: Build with Sphinx | |
run: poetry run sphinx-build docs/source _site |