Enable PyTest in the Github pipeline

This commit is contained in:
nicolargo 2024-12-26 11:08:06 +01:00
parent c828f21753
commit 8276ddd184
1 changed files with 7 additions and 7 deletions

View File

@ -34,7 +34,7 @@ jobs:
needs: source-code-checks
# https://github.com/actions/runner-images?tab=readme-ov-file#available-images
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
@ -52,11 +52,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Unitary tests
run: |
python ./unittest-core.py
python -m pytest ./tests/test_core.py
# Error appear with h11, not related to Glances
# Should be tested if correction is done
@ -69,9 +70,7 @@ jobs:
# runs-on: windows-2022
# strategy:
# matrix:
# # Python version "3.12" introduce this issue:
# # https://github.com/nicolargo/glances/actions/runs/6439648370/job/17487567454
# python-version: ["3.8", "3.9", "3.10", "3.11"]
# python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
# steps:
# - uses: actions/checkout@v4
@ -85,12 +84,13 @@ jobs:
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install pytest
# if (Test-Path -PathType Leaf "requirements.txt") { python -m pip install -r requirements.txt }
# python setup.py install
# pip install .
# - name: Unitary tests
# run: |
# python ./unittest-core.py
# python -m pytest ./tests/test_core.py
test-macos: