@@ -22,63 +22,57 @@ jobs:
2222 fail-fast : false
2323 matrix :
2424 os : [windows-latest, ubuntu-latest, macos-13]
25- python-version : ["3.7", "3.8", "3.9", "3.10", "3.11"]
26- exclude :
27- - os : macos-13
28- python-version : " 3.7"
29- - os : macos-13
30- python-version : " 3.8"
31- - os : macos-13
32- python-version : " 3.9"
33- - os : macos-13
34- python-version : " 3.10"
25+ python-version : ["3.8", "3.9", "3.10", "3.11"]
3526 steps :
36- - name : Set up Python ${{ matrix.python-version }}
37- uses : actions/setup-python@v5
38- with :
39- python-version : ${{ matrix.python-version }}
40-
27+ - name : Set up Micromamba for Python ${{ matrix.python-version }}
28+ uses : mamba-org/setup-micromamba@v1
29+
4130 - name : Checkout master branch
4231 uses : actions/checkout@v4
4332
4433 - name : Install dependencies
4534 run : |
46- python -m pip install --upgrade pip
47- pip install .[dev]
48- pip install pytest-timeout
49- pip install pytest-xvfb
35+ micromamba create -y -n myenv -c conda-forge python=${{ matrix.python-version }} pip pytest-timeout pytest-xvfb
36+ - name : Install open3d on MacOS
37+ if : runner.os == 'MacOS'
38+ run : micromamba install -y -n myenv -c conda-forge open3d
39+ - name : Install wcwidth on Linux
40+ if : runner.os == 'Linux'
41+ run : micromamba install -y -n myenv -c conda-forge wcwidth
42+ - name : Install package and data package
43+ run : |
44+ micromamba run -n myenv pip install .[dev]
5045 # install the data package
5146 cd mvtb-data
47+ micromamba run -n myenv python -m pip install .
5248 - name : Test with pytest
5349 env :
5450 MPLBACKEND : TkAgg
5551 run : |
56- pytest --ignore=machinevisiontoolbox/blocks --timeout=50 --timeout_method thread -s
52+ micromamba run -n myenv pytest --ignore=machinevisiontoolbox/blocks --timeout=50 --timeout_method thread -s
5753
5854 codecov :
5955 # If all tests pass:
6056 # Run coverage and upload to codecov
6157 needs : unittest
6258 runs-on : ubuntu-latest
6359 steps :
64- - uses : actions/checkout@v2
65- - name : Set up Python 3.8
66- uses : actions/setup-python@v1
67- with :
68- python-version : 3.8
60+ - uses : actions/checkout@v4
61+ - name : Set up Micromamba for Python 3.11
62+ uses : mamba-org/setup-micromamba@v1
6963 - name : Install dependencies
7064 run : |
71- python -m pip install --upgrade pip
72- pip install .[dev]
65+ micromamba create -y -n myenv -c conda-forge python=3.11 pip coverage
66+ micromamba run -n myenv pip install .[dev]
7367 # install the data package
7468 cd mvtb-data
75- python -m pip install .
69+ micromamba run -n myenv python -m pip install .
7670 - name : Run coverage
7771 run : |
78- coverage run --source=machinevisiontoolbox -m pytest --ignore=machinevisiontoolbox/blocks
79- coverage report
80- coverage xml
72+ micromamba run -n myenv coverage run --source=machinevisiontoolbox -m pytest --ignore=machinevisiontoolbox/blocks
73+ micromamba run -n myenv coverage report
74+ micromamba run -n myenv coverage xml
8175 - name : upload coverage to Codecov
82- uses : codecov/codecov-action@v3
76+ uses : codecov/codecov-action@v4
8377 with :
8478 file : ./coverage.xml
0 commit comments