Skip to content

pr-validation

pr-validation #2289

Workflow file for this run

name: pr-validation
# Controls when the workflow will run
on:
workflow_dispatch:
push:
branches:
- '**'
pull_request:
schedule:
# Run every week day at 3h30 UTC
- cron: '30 3 * * 1,2,3,4,5'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
run_tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
python: "3.11"
- os: ubuntu-latest
python: "3.12"
- os: ubuntu-latest
python: "3.13"
- os: ubuntu-latest
python: "3.13"
pip-flags: "--pre"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
with:
version: "latest"
- name: Install dependencies
run: |
uv sync --extra doc --extra dev
- name: Lint with ruff
run: |
uv run ruff check --fix --exit-non-zero-on-fix pydeseq2
- name: Format with ruff
run: |
uv run ruff format --check pydeseq2
- name: Type check with mypy
run: |
uv run mypy -p pydeseq2
- name: Test with pytest
run: |
uv run coverage run -m pytest
- name: Generate code coverage report
run: |
uv run coverage html
- name: Upload coverage artifacts
uses: actions/upload-artifact@v4
with:
name: test-coverage-report-${{ strategy.job-index }}
path: htmlcov/
retention-days: 20
- name: Compile docs
run: |
uv pip freeze > requirements.txt
cd docs
uv run make clean html
- name: Build package
run: |
uv build