Skip to content

Split quality checks from CI test matrix #3982

Split quality checks from CI test matrix

Split quality checks from CI test matrix #3982

Workflow file for this run

name: Test Rich module
on: [pull_request]
jobs:
quality:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: poetry
cache-dependency-path: poetry.lock
- name: Install and configure Poetry
# TODO: workaround for https://github.com/snok/install-poetry/issues/94
uses: snok/install-poetry@v1.3.4
with:
version: 1.3.1
virtualenvs-in-project: true
- name: Install dependencies
run: poetry install
- name: Format check with black
run: poetry run make format-check
- name: Typecheck with mypy
run: poetry run make typecheck
- name: Test with pytest (with coverage)
run: poetry run pytest tests -v --cov=./rich --cov-report=xml:./coverage.xml --cov-report term-missing
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: rich
flags: unittests
env_vars: OS,PYTHON
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
exclude:
- { os: windows-latest, python-version: "3.13" }
- { os: ubuntu-latest, python-version: "3.11" }
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: poetry
cache-dependency-path: poetry.lock
- name: Install and configure Poetry
# TODO: workaround for https://github.com/snok/install-poetry/issues/94
uses: snok/install-poetry@v1.3.4
with:
version: 1.3.1
virtualenvs-in-project: true
- name: Install dependencies
run: poetry install
- name: Test with pytest
run: poetry run pytest tests -v