Skip to content

Commit

Permalink
Run Python test on Mac M1 in virtual environment to prevent "error: e…
Browse files Browse the repository at this point in the history
…xternally-managed-environment".
  • Loading branch information
asmorkalov committed Dec 29, 2023
1 parent d2a08b9 commit 21e79d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build_wheels_macos_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,24 @@ jobs:
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/
- name: Create Venv for test
run: |
test -d "${{ github.workspace }}/opencv_test" && rm -rf "${{ github.workspace }}/opencv_test"
python${{ matrix.python-version }} -m venv ${{ github.workspace }}/opencv_test
- name: Package installation
run: |
source ${{ github.workspace }}/opencv_test/bin/activate
python${{ matrix.python-version }} -m pip install --user --no-cache --force-reinstall wheelhouse/opencv*.whl
cd ${{ github.workspace }}/tests
python${{ matrix.python-version }} get_build_info.py
- name: Run tests
run: |
source ${{ github.workspace }}/opencv_test/bin/activate
cd ${{ github.workspace }}/opencv
python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
- name: Pylint test
run: |
source ${{ github.workspace }}/opencv_test/bin/activate
python${{ matrix.python-version }} -m pip install pylint==2.15.9
cd ${{ github.workspace }}/tests
python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE
Expand Down

0 comments on commit 21e79d2

Please sign in to comment.