CI: typo in testing requirements #160
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: lint | |
on: | |
push: | |
paths-ignore: | |
- .github/appveyor.yml | |
# tags: | |
# - '*' | |
pull_request: | |
# on pull, automatic | |
workflow_dispatch: | |
# allow manual trigger | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
env: | |
# note that some tools care only for the name, not the value | |
FORCE_COLOR: 1 | |
jobs: | |
lint: | |
name: ${{ matrix.toxenv }} / ${{ matrix.os }} / ${{ matrix.python-version }} | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes | |
timeout-minutes: 4 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
toxenv: [lint, docs-lint, pycodestyle, format, mypy] | |
python-version: [ "3.10" ] | |
os: ["ubuntu-latest"] | |
include: | |
# this one is used for checking support/docs files | |
- os: ubuntu-latest | |
python-version: "3.10" | |
toxenv: null | |
# these ensure our lint-related tox runs can run on odd platforms | |
- os: windows-latest | |
python-version: "3.12" | |
toxenv: format | |
- os: macos-latest | |
python-version: "3.12" | |
toxenv: docs-lint | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Using Python ${{ matrix.python-version }} | |
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: pyproject.toml | |
- name: "Install Dependencies (cache hit: ${{ steps.setup-python.outputs.cache-hit }})" | |
if: ${{ matrix.toxenv }} | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
- run: tox -e ${{ matrix.toxenv }} | |
if: ${{ matrix.toxenv }} | |
- name: "Update docs" | |
if: ${{ ! matrix.toxenv }} | |
run: | | |
python -m pip install .[dev] | |
# this will update docs/source/settings.rst - but will not create html output | |
(cd docs && sphinx-build -b "dummy" -d _build/doctrees source "_build/dummy") | |
if unclean=$(git status --untracked-files=no --porcelain) && [ -z "$unclean" ]; then | |
echo "no uncommitted changes in working tree (as it should be)" | |
else | |
echo "did you forget to run `make -C docs html`?" | |
echo "$unclean" | |
exit 2 | |
fi | |
- name: "Lint support files" | |
if: ${{ ! matrix.toxenv }} | |
env: | |
# annoying results for pl_PL and fr_FR.. still the only *obvious* choice | |
LC_ALL: C | |
run: | | |
tail +6 THANKS | sort --ignore-case --check | |
sort --check .gitignore |