Skip to content

174 precommit install #144

174 precommit install

174 precommit install #144

Workflow file for this run

name: Tests
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- tests/*
- pyorc/*
- pyproject.toml
pull_request:
branches: [ main ]
paths:
- tests/*
- pyorc/*
- pyproject.toml
jobs:
Test-matrix:
name: ${{ matrix.os }} - py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest" ] #, "macos-latest", "windows-latest"]
python-version: ["3.10"] # fix tests to support older versions
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
id: pysetup
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: Cache hit
run: echo '${{ steps.pysetup.outputs.cache-hit }}'
- name: OpenCV dependencies
run: |
sudo apt update
sudo apt install libegl1 libopengl0 ffmpeg -y
# build environment with pip
- name: Install pyorc
run: |
pip install --upgrade pip
pip install .[test,extra]
# run all tests
- name: Test
run: python -m pytest --verbose --cov=pyorc --cov-report xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}