Skip to content

Check types, add code coverage #23

Check types, add code coverage

Check types, add code coverage #23

Workflow file for this run

name: test
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade pip
run: python3 -m pip install --upgrade pip
- name: Install ypywidgets in dev mode
run: pip install .[dev]
- name: Check types
run: mypy src
- name: Run tests
run: pytest ./tests -v --color=yes
- name: Run code coverage
if: ${{ (matrix.python-version == '3.12') && (matrix.os == 'ubuntu-latest') }}
run: |
coverage run -m pytest tests
coverage report --fail-under=100