rich/.github/workflows/pythonpackage.yml

50 lines
1.4 KiB
YAML
Raw Normal View History

2019-12-27 10:10:47 +00:00
name: Test Rich module
2019-12-25 15:27:53 +00:00
2020-07-26 17:29:21 +00:00
on: [pull_request]
2019-12-25 15:27:53 +00:00
jobs:
build:
2020-06-20 17:17:52 +00:00
runs-on: ${{ matrix.os }}
2019-12-25 15:27:53 +00:00
strategy:
matrix:
2020-07-27 16:33:51 +00:00
os: [windows-latest, ubuntu-latest, macos-latest]
python-version: ["3.6", "3.7", "3.8", "3.9"]
2020-11-28 12:32:15 +00:00
defaults:
run:
shell: bash
2019-12-25 15:27:53 +00:00
steps:
2019-12-25 15:37:28 +00:00
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
2020-10-09 14:09:19 +00:00
uses: actions/setup-python@v2
2019-12-25 15:37:28 +00:00
with:
python-version: ${{ matrix.python-version }}
2020-10-09 14:09:19 +00:00
architecture: x64
2020-11-28 12:32:15 +00:00
- name: Install and configure Poetry
2021-05-22 19:04:41 +00:00
uses: snok/install-poetry@v1.1.6
2020-11-28 12:32:15 +00:00
with:
2021-05-22 19:04:41 +00:00
version: 1.1.6
virtualenvs-in-project: true
2019-12-25 15:37:28 +00:00
- name: Install dependencies
2020-11-28 12:32:15 +00:00
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Format check with black
2021-05-22 19:04:41 +00:00
run: |
source $VENV
make format-check
2019-12-25 15:37:28 +00:00
- name: Typecheck with mypy
2021-05-22 19:04:41 +00:00
run: |
source $VENV
make typecheck
2019-12-25 15:37:28 +00:00
- name: Test with pytest
run: |
2021-05-22 19:04:41 +00:00
source $VENV
pytest tests -v --cov=./rich --cov-report=xml:./coverage.xml --cov-report term-missing
2020-07-16 15:48:02 +00:00
- name: Upload code coverage
2020-07-16 16:15:29 +00:00
uses: codecov/codecov-action@v1.0.10
2020-07-16 15:28:59 +00:00
with:
2020-07-16 15:53:41 +00:00
token: ${{ secrets.CODECOV_TOKEN }}
2020-07-16 16:08:40 +00:00
file: ./coverage.xml
2020-07-16 15:28:59 +00:00
name: rich
2020-07-16 16:08:40 +00:00
flags: unittests
env_vars: OS,PYTHON