rich/.github/workflows/pythonpackage.yml
Dave Pearson 17d9369e75
Pin snok/install-poetry for now
There is an issue with the latest version of this action, that's specific to
Python 3.8 on Windows. Pinning to the (as of the time of writing)
last-but-one version lets out tests work again.

See #2568.
2022-10-11 10:08:09 +01:00

50 lines
1.5 KiB
YAML

name: Test Rich module
on: [pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install and configure Poetry
# TODO: workaround for https://github.com/snok/install-poetry/issues/94
uses: snok/install-poetry@v1.3.1
with:
version: 1.1.11
virtualenvs-in-project: true
- name: Install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Format check with black
run: |
source $VENV
make format-check
- name: Typecheck with mypy
run: |
source $VENV
make typecheck
- name: Test with pytest (with coverage)
run: |
source $VENV
pytest tests -v --cov=./rich --cov-report=xml:./coverage.xml --cov-report term-missing
- name: Upload code coverage
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: rich
flags: unittests
env_vars: OS,PYTHON