Skip to content

Commit

Permalink
create test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielburnworth committed Apr 30, 2024
1 parent 6f801bd commit dcba0f5
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
build:
strategy:
matrix:
include:
- opencv: 3
tools: true
- opencv: 4
- opencv: 4
tools: true
- tools: true
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.12"
- if: ${{ matrix.opencv }}
run: pip install opencv-python==${{ matrix.opencv }}.*
- if: ${{ matrix.tools }}
run: pip install farmware_tools
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install coveralls numpy
- run: python -c 'import numpy; print("NumPy " + numpy.__version__)'
- if: ${{ matrix.opencv }}
run: python -c 'import cv2; print("OpenCV " + cv2.__version__)'
- if: ${{ matrix.opencv }}
run: python -m coverage run --source . --omit=tests.py -m unittest discover -v
- if: ${{ !matrix.opencv }}
run: python -m coverage run --source . --omit=tests.py -m unittest tests.TakePhotoTest.test_opencv_missing
- name: Coveralls
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit dcba0f5

Please sign in to comment.