-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (50 loc) · 1.4 KB
/
install_test_from_requirements.yaml
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
51
52
name: Install from requirements and tests
on:
push:
branches:
- 'main'
pull_request:
types: [opened, reopened, synchronize]
branches:
- 'main'
- 'release/v*'
paths:
- 'src/**'
- '!*.md'
schedule:
- cron: '0 4 * * 1-5'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Free space
# Free space as indicated here : https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install CUDA 12.1
run: |
bash -x .github/workflows/scripts/cuda-install.sh
- name: Install the project
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
python -m pip install .[test]
- name: Run tests
run: |
python -m pytest
python -m mypy --ignore-missing-imports --allow-redefinition --no-strict-optional -p src
env:
HF_TOKEN: ${{ secrets.HUGGINGFACE_TOKEN }}