Skip to content

Commit 21f2571

Browse files
authored
Update GitHub Actions workflow for Node.js and Python
Updated GitHub Actions workflow to use Node.js v6 and Python setup v6. Modified test execution to handle absence of tests without failing.
1 parent 9e7ecc5 commit 21f2571

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

.github/workflows/i-miei-test.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,34 @@
1-
# 1. Il nome della tua pipeline
21
name: Controllo Qualità e Test
32

4-
# 2. Quando deve attivarsi (Trigger)
53
on:
64
push:
7-
branches: [ "master", "main" ] # Parte ogni volta che fai un push su questi branch
5+
branches: [ "master", "main" ]
86
pull_request:
9-
branches: [ "master", "main" ] # Parte ogni volta che apri una PR
7+
branches: [ "master", "main" ]
108

11-
# 3. Cosa deve fare fisicamente (I lavori)
129
jobs:
1310
esecuzione-test:
14-
# Sistema operativo della macchina virtuale di GitHub
1511
runs-on: ubuntu-latest
1612

17-
# La sequenza di comandi da eseguire
1813
steps:
19-
# Scarica il codice del tuo repository dentro la macchina virtuale
14+
# Scarica il codice usando la versione v6 (Node.js 24)
2015
- name: Scarica il codice
21-
uses: actions/checkout@v4
16+
uses: actions/checkout@v6
2217

23-
# Configura l'ambiente (in questo caso Python)
18+
# Configura Python usando la versione v6 (Node.js 24)
2419
- name: Configura Python
25-
uses: actions/setup-python@v5
20+
uses: actions/setup-python@v6
2621
with:
2722
python-version: '3.10'
2823

29-
# Installa le dipendenze del tuo progetto
24+
# Installa le dipendenze del progetto se esiste il file requirements.txt
3025
- name: Installa dipendenze
3126
run: |
3227
python -m pip install --upgrade pip
3328
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
3429
35-
# Lancia i test veri e propri
30+
# Installa pytest e il plugin per gestire l'assenza di test senza fallire
3631
- name: Avvia i Test con Pytest
3732
run: |
38-
pip install pytest
39-
pytest
33+
pip install pytest pytest-custom-exit-code
34+
pytest --suppress-no-test-exit-code

0 commit comments

Comments
 (0)