mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-16 08:21:20 -04:00
ci: cleanup python checks
* Add a 'base'-step, python-venv, that creates the venv and installs all python packages we'll be using. * Make the codespell/mypy steps depend on python-venv, and don't install anything (it's already done by python-venv)
This commit is contained in:
parent
b3cb180e44
commit
3f5340a091
1 changed files with 22 additions and 10 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- yaml -*-
|
# -*- yaml -*-
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: codespell
|
- name: python-venv
|
||||||
when:
|
when:
|
||||||
- event: [manual, pull_request]
|
- event: [manual, pull_request]
|
||||||
- event: [push, tag]
|
- event: [push, tag]
|
||||||
|
|
@ -11,9 +11,26 @@ 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
|
- python -m venv venv
|
||||||
- source codespell-venv/bin/activate
|
- source venv/bin/activate
|
||||||
|
- python -m pip install --upgrade pip
|
||||||
- pip install codespell
|
- pip install codespell
|
||||||
|
- pip install mypy
|
||||||
|
- pip install ruff
|
||||||
|
- deactivate
|
||||||
|
|
||||||
|
- name: codespell
|
||||||
|
when:
|
||||||
|
- event: [manual, pull_request]
|
||||||
|
- event: [push, tag]
|
||||||
|
branch: [master, releases/*]
|
||||||
|
depends_on: [python-venv]
|
||||||
|
image: alpine:edge
|
||||||
|
commands:
|
||||||
|
- ls -a
|
||||||
|
- ls venv
|
||||||
|
- python --version
|
||||||
|
- source venv/bin/activate
|
||||||
- codespell
|
- codespell
|
||||||
- deactivate
|
- deactivate
|
||||||
|
|
||||||
|
|
@ -22,15 +39,10 @@ steps:
|
||||||
- event: [manual, pull_request]
|
- event: [manual, pull_request]
|
||||||
- event: [push, tag]
|
- event: [push, tag]
|
||||||
branch: [master, releases/*]
|
branch: [master, releases/*]
|
||||||
|
depends_on: [python-venv]
|
||||||
image: alpine:edge
|
image: alpine:edge
|
||||||
commands:
|
commands:
|
||||||
- apk add openssl
|
- source venv/bin/activate
|
||||||
- apk add python3
|
|
||||||
- apk add py3-pip
|
|
||||||
- python3 -m venv mypy-venv
|
|
||||||
- source mypy-venv/bin/activate
|
|
||||||
- pip install mypy
|
|
||||||
- pip install ruff
|
|
||||||
- mypy
|
- mypy
|
||||||
- ruff check
|
- ruff check
|
||||||
- deactivate
|
- deactivate
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue