-
Notifications
You must be signed in to change notification settings - Fork 559
50 lines (43 loc) · 1.15 KB
/
contrib-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 }}