From ec55a77ef92564556c24bf69d7fce2236a4d7c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Oberd=C3=B6rfer?= Date: Fri, 18 Jul 2025 16:29:15 +0200 Subject: [PATCH] CI: run workflows only on latest Python --- .github/workflows/publish.yml | 22 +++++++++++----------- .github/workflows/test.yml | 14 +++++++------- QLog/azure_system_logger.py | 4 ++-- QLog/system_logger.py | 4 ++-- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 36fca6b..1629245 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.7, 3.8 ] + python-version: [ 3.11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install pylint @@ -32,11 +32,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.7, 3.8 ] + python-version: [ 3.11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install pytest @@ -44,7 +44,7 @@ jobs: - name: Test with pytest run: pytest -v --doctest-modules --cov=./ - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v5 with: fail_ci_if_error: true @@ -52,11 +52,11 @@ jobs: needs: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - name: Install twine run: pip install twine wheel - name: Build package diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 676c8cb..35f0f1d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,11 +15,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.7, 3.8 ] + python-version: [ 3.11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install pylint @@ -32,11 +32,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ 3.7, 3.8 ] + python-version: [ 3.11 ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Install pytest @@ -44,6 +44,6 @@ jobs: - name: Test with pytest run: pytest -v --doctest-modules --cov=./ - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v5 with: fail_ci_if_error: true diff --git a/QLog/azure_system_logger.py b/QLog/azure_system_logger.py index 711ab9c..4bd6d19 100644 --- a/QLog/azure_system_logger.py +++ b/QLog/azure_system_logger.py @@ -14,9 +14,9 @@ def __init__(self, log_level=LogLevel.INFO): self.log_level = log_level if self.log_level is LogLevel.INFO: logging.getLogger().setLevel(logging.INFO) - if self.log_level is LogLevel.WARNING: + elif self.log_level is LogLevel.WARNING: logging.getLogger().setLevel(logging.WARNING) - if self.log_level is LogLevel.ERROR: + elif self.log_level is LogLevel.ERROR: logging.getLogger().setLevel(logging.ERROR) else: logging.getLogger().setLevel(logging.DEBUG) diff --git a/QLog/system_logger.py b/QLog/system_logger.py index 8d81d85..12445b2 100644 --- a/QLog/system_logger.py +++ b/QLog/system_logger.py @@ -14,9 +14,9 @@ def __init__(self, log_level=LogLevel.INFO): self.log_level = log_level if self.log_level is LogLevel.INFO: logging.getLogger().setLevel(logging.INFO) - if self.log_level is LogLevel.WARNING: + elif self.log_level is LogLevel.WARNING: logging.getLogger().setLevel(logging.WARNING) - if self.log_level is LogLevel.ERROR: + elif self.log_level is LogLevel.ERROR: logging.getLogger().setLevel(logging.ERROR) else: logging.getLogger().setLevel(logging.DEBUG)