Update pyproject.toml and GitHub actions #2
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 | |
env: | |
HATCH_VERSION: "1.7.0" | |
PYTHON_VERSION: "3.9" | |
PYTHON_PACKAGE_NAME: "jupyterlab_display_name" | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Hatch | |
run: pipx install hatch==${{ env.HATCH_VERSION }} | |
- name: Set up Python with pip cache | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Check Formatting (Black) | |
run: hatch run black ${{ env.PYTHON_PACKAGE_NAME }} --check | |
- name: Lint (Flake8) | |
run: hatch run flake8 ${{ env.PYTHON_PACKAGE_NAME }} | |
- name: Lint (Pylint) | |
run: hatch run pylint ${{ env.PYTHON_PACKAGE_NAME }} | |
- name: Type Check (Mypy) | |
run: hatch run mypy ${{ env.PYTHON_PACKAGE_NAME }} |