Skip to content

Contrib tests

Contrib tests #104

Workflow file for this run

name: Contrib tests
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 6' # Run once a week, Saturday midnight
push:
branches:
- ci_contrib_*
pull_request:
types: [assigned, opened, synchronize, reopened]
paths:
- contrib/**
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
contrib: [
"sentence_transformers",
"spacy",
"timm",
]
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
# Install pip
- name: Install pip
run: pip install --upgrade pip
# Install downstream library and its specific dependencies
- name: Install ${{ matrix.contrib }}
run: pip install -r contrib/${{ matrix.contrib }}/requirements.txt
# Install huggingface_hub from source code + testing extras
- name: Install `huggingface_hub`
run: |
pip uninstall -y huggingface_hub
pip install .[testing]
# Run tests
- name: Run tests
run: pytest contrib/${{ matrix.contrib }}