fix None type bug for MTCNN #190
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests on PR | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
- master | |
jobs: | |
# Job (1): Run testing in parallel against multiples OSs and Python versions | |
test: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
name: Test | |
runs-on: ${{ matrix.os }} | |
# Determines whether the entire workflow should pass/fail based on parallel jobs | |
continue-on-error: ${{ matrix.ok-fail }} | |
defaults: | |
# This ensures each step gets properly configured bash shell for conda commands to work | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
# OSs to test | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
# Python versions to test | |
python-version: [3.8, 3.9, "3.10"] | |
# By default everything should pass for the workflow to pass | |
ok-fail: [false] | |
steps: | |
# Step up miniconda | |
- name: Download and setup Miniconda | |
uses: conda-incubator/setup-miniconda@059455a698430d8b68fa317268fa2e3da3492a98 | |
with: | |
miniconda-version: "latest" | |
python-version: ${{ matrix.python-version }} | |
# Check out latest code on github | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
# Install common sci-py packages via conda as well as testing packages and requirements | |
- name: Install Dependencies | |
run: | | |
conda activate test | |
conda env list | |
pip install . -r requirements-dev.txt | |
# Actually run the tests with coverage | |
- name: Run Tests | |
run: | | |
conda activate test | |
conda env list | |
black --check --verbose . | |
pytest --cov=feat -rs | |
# Job (3): Just build jupyter book but don't deploy it. | |
docs: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
name: Build docs only | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
- name: Upgrade pip | |
run: | | |
# install pip=>20.1 to use "pip cache dir" | |
python3 -m pip install --upgrade pip | |
- name: Install deps | |
run: | | |
python3 -m pip install . -r requirements.txt | |
python3 -m pip install -r ./requirements-dev.txt | |
- name: Build book | |
run: | | |
jupyter-book build docs |