cleanup #130
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: CI | |
on: | |
push: | |
branches: "*" | |
pull_request: | |
branches: "*" | |
jobs: | |
# Run "pre-commit run --all-files" | |
pre-commit: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 2 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
# ref: https://github.com/pre-commit/action | |
- uses: pre-commit/action@v2.0.0 | |
- name: Help message if pre-commit fail | |
if: ${{ failure() }} | |
run: | | |
echo "You can install pre-commit hooks to automatically run formatting" | |
echo "on each commit with:" | |
echo " pre-commit install" | |
echo "or you can run by hand on staged files with" | |
echo " pre-commit run" | |
echo "or after-the-fact on already committed files with" | |
echo " pre-commit run --all-files" | |
build-n-test-n-coverage: | |
name: Build, test and code coverage | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: [3.7, 3.8, 3.9] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: "3.9" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install --upgrade setuptools pip | |
pip install --upgrade --upgrade-strategy eager --pre -e .[test] pytest-cov codecov 'coverage<5' | |
pip freeze | |
- name: Run the tests | |
run: py.test --cov jupyter_client -v jupyter_client | |
- name: Code coverage | |
run: codecov |