-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 886 Bytes
/
tests.yml
File metadata and controls
35 lines (29 loc) · 886 Bytes
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
name: API Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
# 1. Récupération du code
- name: Checkout repository
uses: actions/checkout@v3
# 2. Configuration Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
# 3. Installation dépendances
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --no-cache-dir torch==2.2.0 -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install --no-cache-dir "numpy<2"
pip install --no-cache-dir -r requirements.txt
pip install pytest
# 4. Lancer les tests Pytest
- name: Run tests
run: pytest -v --maxfail=1 --disable-warnings