📚 docs: enhance README.md with formatting improvements and additional… #147
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Pipeline | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
types: [opened, synchronize] | |
schedule: | |
- cron: '0 0 * * 1' # Every Monday at 00:00 UTC | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: [3.11, 3.12, 3.13] | |
name: Test Pipeline - Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
timeout-minutes: 15 | |
steps: | |
- name: 📥 Checkout the repository | |
uses: actions/checkout@v4.2.2 | |
- name: 🐍 Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5.3.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- id: cache | |
name: 📦 Create cache | |
uses: actions/cache@v4.2.0 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'requirements*') }} | |
restore-keys: ${{ matrix.os }}-python-${{ matrix.python-version }}- | |
- name: 📦 Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: make install-dev | |
- name: 📂 Create coverage directory | |
run: mkdir coverage | |
- name: 🏃 Run Tests | |
run: make coverage | |
env: | |
COVERAGE_FILE: coverage/.coverage_${{ matrix.os }}_python_${{ matrix.python-version }} | |
CONTEXT: ${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'requirements*') }} | |
- name: 🫙 Store tests coverage | |
uses: actions/upload-artifact@v4.5.0 | |
if: always() | |
with: | |
name: coverage_${{ matrix.os }}_python_${{ matrix.python-version }} | |
path: coverage | |
include-hidden-files: true | |
coverage-combine: | |
needs: [test] | |
if: always() | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.13] | |
steps: | |
- name: 📥 Checkout the repository | |
uses: actions/checkout@v4.2.2 | |
- name: 🐍 Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5.3.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- id: cache | |
name: 📦 Create cache | |
uses: actions/cache@v4.2.0 | |
with: | |
path: ${{ env.pythonLocation }} | |
key: ${{ matrix.os }}-python-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml', 'requirements*') }} | |
restore-keys: ${{ matrix.os }}-python-${{ matrix.python-version }}- | |
- name: 📦 Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: make install-dev | |
- name: 📥 Download coverage files | |
uses: actions/download-artifact@v4.1.8 | |
with: | |
merge-multiple: true | |
pattern: coverage_* | |
path: coverage | |
- name: 🏃 Combine coverage files | |
run: | | |
ls -la coverage | |
coverage combine coverage/.coverage_* | |
- name: 📊 Generate coverage report | |
run: | | |
coverage report | |
coverage html --show-contexts --title "Coverage for ${{ github.sha }}" | |
- name: 🫙 Store coverage report | |
uses: actions/upload-artifact@v4.5.0 | |
with: | |
name: coverage-html | |
path: htmlcov | |
# This job does nothing and is only used for the branch protection | |
check-all: | |
needs: [test] | |
if: always() | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- name: ✅ All tests passed | |
uses: re-actors/alls-green@v1.2.2 | |
with: | |
jobs: ${{ toJSON(needs) }} |