[pre-commit.ci] pre-commit autoupdate #292
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
# GitHub Action to check our dictionary, this should only be used by the codetypo project itself | |
# For general usage in your repo, see the example in codetypo.yml | |
# https://github.com/khulnasoft/codetypo | |
# Concurrency cancels an action on a given PR once a new commit is pushed | |
name: Pytest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | |
cancel-in-progress: true | |
on: [push, pull_request] | |
permissions: {} | |
jobs: | |
test: | |
env: | |
REQUIRE_ASPELL: true | |
RUFF_OUTPUT_FORMAT: github | |
# Make sure we're using the latest aspell dictionary | |
runs-on: ubuntu-24.04-arm | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
- "3.13" | |
no-toml: | |
- "" | |
include: | |
- python-version: "3.10" | |
no-toml: "no-toml" | |
name: ${{ matrix.python-version }} ${{ matrix.no-toml }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Setup python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- run: sudo apt-get install libaspell-dev aspell-en | |
- name: Install dependencies | |
run: | | |
python --version # just to check | |
pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors | |
pip install --upgrade "setuptools!=47.2.0" docutils setuptools_scm[toml] twine | |
pip install aspell-python-py3 | |
pip install -e ".[dev]" # install the codetypo dev packages | |
- run: codetypo --help | |
- run: codetypo --version | |
- run: make check | |
- uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
# tomli should not be required for the next two steps (and make sure it's not) | |
- run: pip uninstall -yq tomli | |
if: ${{ matrix.no-toml == 'no-toml' }} | |
- run: codetypo --check-filenames --skip="./.*,./build/*,./codetypo/data/*,./codetypo/tests/test_basic.py,./example/code.c,./junit-results.xml,*.egg-info/*,*.pyc,*.sig,pyproject-codetypo.precommit-toml,README.rst," | |
# this file has an error | |
- run: "! codetypo codetypo/tests/test_basic.py" | |
make-check-dictionaries: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install general dependencies | |
run: pip install --upgrade pip wheel # upgrade to latest pip find 3.5 wheels; wheel to avoid errors | |
- name: Install codetypo dependencies | |
run: pip install -e ".[dev]" |