Skip to content

Commit

Permalink
chore: Use tox for style and spelling checks
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed May 29, 2024
1 parent 50d4cba commit 18c7afd
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 29 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Check formatting
run: |
pipx run flake8 src
pipx run pydocstyle src
release-pypi:
name: Publish released package to pypi.org
environment: release-pypi
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Checks

on:
push:
branches: [main]
pull_request:
branches: [main]

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Force tox and pytest to use color
env:
FORCE_COLOR: true

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
strategy:
matrix:
check: ['style', 'spellcheck']

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Show tox config
run: tox c
- name: Run tox
run: tox -e ${{ matrix.check }}
24 changes: 0 additions & 24 deletions .github/workflows/codespell.yml

This file was deleted.

6 changes: 6 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ requires =
envlist =
py3{8,9,10,11,12}-{full,pre}
py38-min
style
spellcheck
skip_missing_interpreters = true

# Configuration that allows us to split tests across GitHub runners effectively
Expand All @@ -21,6 +23,10 @@ DEPENDS =
full: full
pre: pre

CHECK =
style: style
spellcheck: spellcheck

[testenv]
description = Pytest with coverage
labels = test
Expand Down

0 comments on commit 18c7afd

Please sign in to comment.