ci: combine the codespell and mypy stages

They both need python and a venv, so let's combine them, to avoid
having to install the same things twice.
This commit is contained in:
Daniel Eklöf 2025-12-26 17:23:46 +01:00
parent 41679e64a8
commit bb6968c284
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 5 additions and 19 deletions

View file

@ -1,7 +1,7 @@
# -*- yaml -*- # -*- yaml -*-
steps: steps:
- name: codespell - name: pychecks
when: when:
- event: [manual, pull_request] - event: [manual, pull_request]
- event: [push, tag] - event: [push, tag]
@ -11,26 +11,12 @@ steps:
- apk add openssl - apk add openssl
- apk add python3 - apk add python3
- apk add py3-pip - apk add py3-pip
- python3 -m venv codespell-venv - python3 -m venv venv
- source codespell-venv/bin/activate - source venv/bin/activate
- pip install codespell - pip install codespell
- codespell
- deactivate
- name: mypy
when:
- event: [manual, pull_request]
- event: [push, tag]
branch: [master, releases/*]
image: alpine:edge
commands:
- apk add openssl
- apk add python3
- apk add py3-pip
- python3 -m venv mypy-venv
- source mypy-venv/bin/activate
- pip install mypy - pip install mypy
- pip install ruff - pip install ruff
- codespell
- mypy - mypy
- ruff check - ruff check
- deactivate - deactivate

View file

@ -6,5 +6,5 @@ files = '$MYPY_CONFIG_FILE_DIR/scripts'
strict = true strict = true
[tool.codespell] [tool.codespell]
skip = 'pyproject.toml,./subprojects,./pkg,./src,./bld,foot.info,./unicode,.*-venv' skip = 'pyproject.toml,./subprojects,./pkg,./src,./bld,foot.info,./unicode,./venv'
ignore-regex = 'terminfo capability `rin`|\* Simon Ser|\* \[zar\]\(https://codeberg.org/zar\)|iterm theme|iterm.toml|iterm/OneHalfDark.itermcolors' ignore-regex = 'terminfo capability `rin`|\* Simon Ser|\* \[zar\]\(https://codeberg.org/zar\)|iterm theme|iterm.toml|iterm/OneHalfDark.itermcolors'