[pre-commit.ci] pre-commit autoupdate (#13) #37
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: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
pre-commit: | |
name: pre-commit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
- uses: pre-commit/[email protected] | |
with: | |
extra_args: --all-files --hook-stage=manual | |
- 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 --hook-stage=manual" | |
test: | |
name: Run tests on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install mamba | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-file: environment-dev.yml | |
environment-name: pycrdt-websocket | |
extra-specs: python=${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install .[test] | |
cd tests; npm install | |
- name: Check types | |
run: | | |
mypy pycrdt_websocket tests | |
- name: Run tests | |
run: | | |
pytest -v | |
check_release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 | |
- name: Check Release | |
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} |