Skip to content

Commit 67a3548

Browse files
authored
Create .yml
1 parent befd602 commit 67a3548

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

  • .github/workflows

.github/workflows/.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: API Tests
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# 1. Récupération du code
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
17+
18+
# 2. Configuration Python
19+
- name: Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: "3.10"
23+
24+
# 3. Installation dépendances
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install --no-cache-dir torch==2.2.0 -f https://download.pytorch.org/whl/cpu/torch_stable.html
29+
pip install --no-cache-dir "numpy<2"
30+
pip install --no-cache-dir -r requirements.txt
31+
pip install pytest
32+
33+
# 4. Lancer les tests Pytest
34+
- name: Run tests
35+
run: pytest -v --maxfail=1 --disable-warnings

0 commit comments

Comments
 (0)