From 8276ddd184f698f1779252d8a8b041b10b4f8730 Mon Sep 17 00:00:00 2001 From: nicolargo Date: Thu, 26 Dec 2024 11:08:06 +0100 Subject: [PATCH] Enable PyTest in the Github pipeline --- .github/workflows/test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44c6b4ff..5284eb9c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: