-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 951 Bytes
/
Copy pathi-miei-test.yml
File metadata and controls
34 lines (28 loc) · 951 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
name: Controllo Qualità e Test
on:
push:
branches: [ "master", "main" ]
pull_request:
branches: [ "master", "main" ]
jobs:
esecuzione-test:
runs-on: ubuntu-latest
steps:
# Scarica il codice usando la versione v6 (Node.js 24)
- name: Scarica il codice
uses: actions/checkout@v6
# Configura Python usando la versione v6 (Node.js 24)
- name: Configura Python
uses: actions/setup-python@v7
with:
python-version: '3.10'
# Installa le dipendenze del progetto se esiste il file requirements.txt
- name: Installa dipendenze
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# Installa pytest e il plugin per gestire l'assenza di test senza fallire
- name: Avvia i Test con Pytest
run: |
pip install pytest pytest-custom-exit-code
pytest --suppress-no-test-exit-code