Skip to content

Commit

Permalink
Merge pull request #941 from asmorkalov/as/mac_m1_venv_for_test
Browse files Browse the repository at this point in the history
Run Python test on Mac M1 in virtual environment to prevent "error: externally-managed-environment".
  • Loading branch information
asmorkalov authored Dec 30, 2023
2 parents 8fce57f + 949b65e commit fe67f8e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/build_wheels_macos_m1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,25 @@ 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: |
python${{ matrix.python-version }} -m pip install --user --no-cache --force-reinstall wheelhouse/opencv*.whl
source ${{ github.workspace }}/opencv_test/bin/activate
python${{ matrix.python-version }} -m pip install --upgrade pip
python${{ matrix.python-version }} -m pip install --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 fe67f8e

Please sign in to comment.