Fixup package #8
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
# This is a basic workflow to help you get started with Actions | |
name: Test-master | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
unittest: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-13] | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
exclude: | |
- os: macos-13 | |
python-version: "3.7" | |
- os: macos-13 | |
python-version: "3.8" | |
- os: macos-13 | |
python-version: "3.9" | |
- os: macos-13 | |
python-version: "3.10" | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout master branch | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[dev] | |
pip install pytest-timeout | |
pip install pytest-xvfb | |
# install the data package | |
cd mvtb-data | |
- name: Test with pytest | |
env: | |
MPLBACKEND: TkAgg | |
run: | | |
pytest --ignore=machinevisiontoolbox/blocks --timeout=50 --timeout_method thread -s | |
codecov: | |
# If all tests pass: | |
# Run coverage and upload to codecov | |
needs: unittest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[dev] | |
# install the data package | |
cd mvtb-data | |
python -m pip install . | |
- name: Run coverage | |
run: | | |
coverage run --source=machinevisiontoolbox -m pytest --ignore=machinevisiontoolbox/blocks | |
coverage report | |
coverage xml | |
- name: upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./coverage.xml |