Skip to content

Add tests folder structure and GitHub actions #13

Add tests folder structure and GitHub actions

Add tests folder structure and GitHub actions #13

Workflow file for this run

name: Run Tests
on:
push:
branches: ["main"]
workflow_dispatch:
pull_request:
types: [opened, synchronize, ready_for_review]
jobs:
run_unit_tests:
runs-on: ${{ matrix.os }}
env:
SENTRY_OPT_OUT: True
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04] # windows-2022 macos-13
python: ['3.8','3.10']
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
python -m pip install --upgrade pip
pip install fastdup pytest pytest-md pytest-emoji datasets
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov datasets fastdup
pip install opencv-python-headless
pip install fastdup --no-deps -U
- name: Run pytest
uses: pavelzw/pytest-action@v2
with:
verbose: true
emoji: true
job-summary: true
custom-arguments: '-q'
click-to-expand: true
report-title: 'Test Report'