From 0b1018a81b2c8951bf98963f106dac82780563d2 Mon Sep 17 00:00:00 2001 From: Ruben van Staveren Date: Tue, 17 Mar 2026 20:41:16 +0100 Subject: [PATCH] Also move test+coverage inside --- .gitea/workflows/python-coverage.yml | 50 ---------------------------- .gitea/workflows/python-lint.yml | 42 +++++++++++++++++++++++ 2 files changed, 42 insertions(+), 50 deletions(-) delete mode 100644 .gitea/workflows/python-coverage.yml diff --git a/.gitea/workflows/python-coverage.yml b/.gitea/workflows/python-coverage.yml deleted file mode 100644 index 565d8df..0000000 --- a/.gitea/workflows/python-coverage.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Python Coverage - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - test-and-coverage: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - "3.11" - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '${{ matrix.python-version }}' - cache: 'pip' - cache-dependency-path: 'requirements.txt' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r requirements-dev.txt - - - name: Run tests with coverage - run: | - pytest --cov=./ --cov-report=term --cov-report=xml --cov-report=html --junitxml=report.xml tests - - - name: Upload coverage artifacts - uses: actions/upload-artifact@v3 - with: - name: coverage-reports - path: | - coverage.xml - htmlcov/ - - - name: Upload test results - uses: actions/upload-artifact@v3 - with: - name: test-results - path: report.xml diff --git a/.gitea/workflows/python-lint.yml b/.gitea/workflows/python-lint.yml index 324a0c7..aeb6ce3 100644 --- a/.gitea/workflows/python-lint.yml +++ b/.gitea/workflows/python-lint.yml @@ -46,3 +46,45 @@ jobs: - name: Analyse code with Bandit run: | bandit -x '**/test_*.py,./.venv/**' -r . + + test-and-coverage: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - "3.11" + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '${{ matrix.python-version }}' + cache: 'pip' + cache-dependency-path: 'requirements.txt' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r requirements-dev.txt + + - name: Run tests with coverage + run: | + pytest --cov=./ --cov-report=term --cov-report=xml --cov-report=html --junitxml=report.xml tests + + - name: Upload coverage artifacts + uses: actions/upload-artifact@v3 + with: + name: coverage-reports + path: | + coverage.xml + htmlcov/ + + - name: Upload test results + uses: actions/upload-artifact@v3 + with: + name: test-results + path: report.xml