Update README.md #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |