@@ -22,62 +22,52 @@ 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
27+ - name : Set up Micromamba for Python ${{ matrix.python-version }}
28+ uses : mamba-org /setup-micromamba@v1
3829 with :
3930 python-version : ${{ matrix.python-version }}
40-
31+
4132 - name : Checkout master branch
4233 uses : actions/checkout@v4
4334
4435 - name : Install dependencies
4536 run : |
46- python -m pip install --upgrade pip
47- pip install .[dev]
48- pip install pytest-timeout
49- pip install pytest-xvfb
37+ micromamba install -y -n myenv -c conda-forge python=${{ matrix.python-version }} pip pytest-timeout pytest-xvfb
38+ micromamba run -n myenv pip install .[dev]
5039 # install the data package
5140 cd mvtb-data
41+ micromamba run -n myenv python -m pip install .
5242 - name : Test with pytest
5343 env :
5444 MPLBACKEND : TkAgg
5545 run : |
56- pytest --ignore=machinevisiontoolbox/blocks --timeout=50 --timeout_method thread -s
46+ micromamba run -n myenv pytest --ignore=machinevisiontoolbox/blocks --timeout=50 --timeout_method thread -s
5747
5848 codecov :
5949 # If all tests pass:
6050 # Run coverage and upload to codecov
6151 needs : unittest
6252 runs-on : ubuntu-latest
6353 steps :
64- - uses : actions/checkout@v2
65- - name : Set up Python 3.8
66- uses : actions /setup-python @v1
54+ - uses : actions/checkout@v4
55+ - name : Set up Micromamba for Python 3.11
56+ uses : mamba-org /setup-micromamba @v1
6757 with :
68- python-version : 3.8
58+ python-version : 3.11
6959 - name : Install dependencies
7060 run : |
71- python -m pip install --upgrade pip
72- pip install .[dev]
61+ micromamba install -y -n myenv -c conda-forge python=${{ matrix.python-version }} pip coverage
62+ micromamba run -n myenv pip install .[dev]
7363 # install the data package
7464 cd mvtb-data
75- python -m pip install .
65+ micromamba run -n myenv python -m pip install .
7666 - name : Run coverage
7767 run : |
78- coverage run --source=machinevisiontoolbox -m pytest --ignore=machinevisiontoolbox/blocks
79- coverage report
80- coverage xml
68+ micromamba run -n myenv coverage run --source=machinevisiontoolbox -m pytest --ignore=machinevisiontoolbox/blocks
69+ micromamba run -n myenv coverage report
70+ micromamba run -n myenv coverage xml
8171 - name : upload coverage to Codecov
8272 uses : codecov/codecov-action@v3
8373 with :
0 commit comments