Skip to content

add test workflow

add test workflow #1

Workflow file for this run

name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude=.venv,yolov5,data
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude=.venv,yolov5,data
- name: Run tests
run: |
python -m pytest tests/ -v