style: format code with Ruff Formatter #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v1 | |
- 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 | |
uses: snok/[email protected] | |
with: | |
version: 1.1.8 | |
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 | |
run: | | |
source $VENV | |
pytest tests -v --cov=./rich --cov-report=xml:./coverage.xml --cov-report term-missing | |
- name: Upload code coverage | |
uses: codecov/[email protected] | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: ./coverage.xml | |
name: rich | |
flags: unittests | |
env_vars: OS,PYTHON |