Skip to content

Use conda-forge numpy to fix Win+py311 issues #96

Use conda-forge numpy to fix Win+py311 issues

Use conda-forge numpy to fix Win+py311 issues #96

Workflow file for this run

# 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.8", "3.9", "3.10", "3.11"]
steps:
- name: Checkout master branch
uses: actions/checkout@v4
- name: Set up Micromamba for Python ${{ matrix.python-version }}
uses: mamba-org/setup-micromamba@v2
with:
init-shell: >-
bash
powershell
environment-name: myenv
create-args: >-
python=${{ matrix.python-version }}
numpy<2
pip
pytest-timeout
pytest-xvfb
matplotlib-base
setuptools
setuptools-scm
open3d
wcwidth
scipy
opencv
spatialmath-python
ansitable
- name: Install package and data package
run: |
micromamba run -n myenv python -m pip install -e .[dev] --no-build-isolation --no-deps
# install the data package
cd mvtb-data
micromamba run -n myenv python -m pip install -e . --no-build-isolation --no-deps
- name: Test with pytest
env:
MPLBACKEND: TkAgg
run: |
micromamba run -n myenv 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@v4
- name: Set up Micromamba for Python 3.11
uses: mamba-org/setup-micromamba@v2
with:
init-shell: >-
bash
powershell
environment-name: myenv
create-args: >-
python=3.11
coverage
numpy<2
pip
pytest-timeout
pytest-xvfb
matplotlib-base
setuptools
setuptools-scm
open3d
wcwidth
scipy
opencv
spatialmath-python
ansitable
- name: Install package and data package
run: |
micromamba run -n myenv python -m pip install -e .[dev] --no-build-isolation --no-deps
# install the data package
cd mvtb-data
micromamba run -n myenv python -m pip install -e . --no-build-isolation --no-deps
- name: Run coverage
run: |
micromamba run -n myenv coverage run --source=machinevisiontoolbox -m pytest --ignore=machinevisiontoolbox/blocks
micromamba run -n myenv coverage report
micromamba run -n myenv coverage xml
- name: upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml