Spellcheck on its own in CI #20
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: [master] | |
jobs: | |
spell-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Check spelling | |
uses: streetsidesoftware/cspell-action@v5 | |
with: | |
incremental_files_only: false | |
ci-checks: | |
needs: spell-check | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
poetry-version: ["1.7.1"] | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install poetry ${{ matrix.poetry-version }} | |
run: | | |
python -m ensurepip | |
python -m pip install --upgrade pip | |
pip install poetry==${{ matrix.poetry-version }} | |
- name: View poetry --help | |
run: poetry --help | |
- name: Install dependencies | |
shell: bash | |
run: poetry install | |
- name: Checking imports with isort | |
run: | | |
poetry run isort -c --profile black --python-version 3 . | |
- name: Checking formatting with black | |
run: | | |
poetry run black --check . | |
- name: Checking style with flake8 | |
run: | | |
poetry run flake8 . | |
- name: Analysing the code with pylint | |
run: | | |
poetry run pylint $(git ls-files '*.py') | |
- name: Analysing typing with pyright | |
run: | | |
poetry run pyright --pythonversion ${{ matrix.python-version }} | |
- name: Run pytest | |
uses: pavelzw/pytest-action@v2 | |
with: | |
verbose: true | |
emoji: false | |
job-summary: true | |
custom-pytest: "poetry run pytest" | |
custom-arguments: "-q" | |
click-to-expand: true | |
report-title: "Test Report" |