Skip to content

⬆️ Pin dependency node to 22.12.0 (#2) #21

⬆️ Pin dependency node to 22.12.0 (#2)

⬆️ Pin dependency node to 22.12.0 (#2) #21

Workflow file for this run

---
name: Testing
# yamllint disable-line rule:truthy
on:
push:
pull_request:
workflow_dispatch:
env:
DEFAULT_PYTHON: "3.11"
jobs:
pytest:
name: Python ${{ matrix.python }}
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.11", "3.12", "3.13"]
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4.2.2
- name: 🏗 Set up uv
uses: astral-sh/setup-uv@v4.2.0
with:
enable-cache: true
python-version: ${{ env.DEFAULT_PYTHON }}
- name: 🏗 Install dependencies
run: uv sync --extra cli --frozen --dev
- name: 🚀 Run pytest
run: uv run pytest --cov peblar tests
- name: ⬆️ Upload coverage artifact
uses: actions/upload-artifact@v4.4.3
with:
name: coverage-${{ matrix.python }}
path: .coverage
coverage:
runs-on: ubuntu-latest
needs: pytest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: ⬇️ Download coverage data
uses: actions/download-artifact@v4.1.8
- name: 🏗 Set up uv
uses: astral-sh/setup-uv@v4.2.0
with:
enable-cache: true
python-version: ${{ env.DEFAULT_PYTHON }}
- name: 🏗 Install dependencies
run: uv sync --extra cli --frozen --dev
- name: 🚀 Process coverage results
run: |
uv run coverage combine coverage*/.coverage*
uv run coverage xml -i
- name: 🚀 Upload coverage report
uses: codecov/codecov-action@v3.1.6
- name: SonarCloud Scan
if: github.event.pull_request.head.repo.fork == false
uses: SonarSource/sonarcloud-github-action@v2.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}