Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Test for OpenCV #34

Merged
merged 10 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,31 @@ jobs:
metacall ./test/requirements.py | findstr "123456"
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Python OpenCV Test
- name: Python OpenCV Test (Install OpenCV)
shell: cmd
run: |
metacall pip install -r test/opencv/requirements.txt
metacall ./test/opencv/opencv.py
metacall pip install -r test/opencv/requirements.txt | findstr "Successfully installed"
IF %ERRORLEVEL% NEQ 0 exit /B 1

# For some reason, OpenCV fails if you do not reinstall numpy
- name: Python OpenCV Test (Uninstall Numpy for OpenCV)
shell: cmd
run: |
metacall pip uninstall numpy --yes
IF %ERRORLEVEL% NEQ 0 exit /B 1

# For some reason, it needs to be split into two different steps in order to work
- name: Python OpenCV Test (Install Numpy for OpenCV)
shell: cmd
run: |
metacall pip install numpy==1.21.6
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Python OpenCV Test (Test OpenCV)
shell: cmd
run: |
metacall ./test/opencv/opencv.py | findstr "OpenCV Version: 3.4.11"
IF %ERRORLEVEL% NEQ 0 exit /B 1

- name: Deploy & FaaS Test
shell: cmd
Expand Down
3 changes: 1 addition & 2 deletions test/opencv/opencv.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
import cv2
print(cv2.__version__)
print('123456')
print("OpenCV Version", cv2.__version__)
3 changes: 1 addition & 2 deletions test/opencv/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
opencv-contrib-python-headless==3.4.11.45
numpy==1.21.6
opencv-contrib-python==3.4.11.45
Loading