Skip to content

Commit 3b3a021

Browse files
committed
ci: split quality checks from test matrix
1 parent 9d8f9a3 commit 3b3a021

1 file changed

Lines changed: 37 additions & 21 deletions

File tree

.github/workflows/pythonpackage.yml

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,40 @@ name: Test Rich module
33
on: [pull_request]
44

55
jobs:
6+
quality:
7+
runs-on: ubuntu-latest
8+
defaults:
9+
run:
10+
shell: bash
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python 3.11
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.11"
17+
- name: Install and configure Poetry
18+
# TODO: workaround for https://github.com/snok/install-poetry/issues/94
19+
uses: snok/install-poetry@v1.3.4
20+
with:
21+
version: 1.3.1
22+
virtualenvs-in-project: true
23+
- name: Install dependencies
24+
run: poetry install
25+
- name: Format check with black
26+
run: poetry run make format-check
27+
- name: Typecheck with mypy
28+
run: poetry run make typecheck
29+
- name: Test with pytest (with coverage)
30+
run: poetry run pytest tests -v --cov=./rich --cov-report=xml:./coverage.xml --cov-report term-missing
31+
- name: Upload code coverage
32+
uses: codecov/codecov-action@v4
33+
with:
34+
token: ${{ secrets.CODECOV_TOKEN }}
35+
file: ./coverage.xml
36+
name: rich
37+
flags: unittests
38+
env_vars: OS,PYTHON
39+
640
build:
741
runs-on: ${{ matrix.os }}
842
strategy:
@@ -12,6 +46,7 @@ jobs:
1246
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1347
exclude:
1448
- { os: windows-latest, python-version: "3.13" }
49+
- { os: ubuntu-latest, python-version: "3.11" }
1550
defaults:
1651
run:
1752
shell: bash
@@ -30,24 +65,5 @@ jobs:
3065
virtualenvs-in-project: true
3166
- name: Install dependencies
3267
run: poetry install
33-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
34-
- name: Format check with black
35-
run: |
36-
source $VENV
37-
make format-check
38-
- name: Typecheck with mypy
39-
run: |
40-
source $VENV
41-
make typecheck
42-
- name: Test with pytest (with coverage)
43-
run: |
44-
source $VENV
45-
pytest tests -v --cov=./rich --cov-report=xml:./coverage.xml --cov-report term-missing
46-
- name: Upload code coverage
47-
uses: codecov/codecov-action@v4
48-
with:
49-
token: ${{ secrets.CODECOV_TOKEN }}
50-
file: ./coverage.xml
51-
name: rich
52-
flags: unittests
53-
env_vars: OS,PYTHON
68+
- name: Test with pytest
69+
run: poetry run pytest tests -v

0 commit comments

Comments
 (0)