skyeweave/.forgejo/workflows/check.yaml

57 lines
1.7 KiB
YAML
Raw Normal View History

2024-08-09 18:57:33 +02:00
on:
push:
branches: "**"
jobs:
pylint:
runs-on: docker
2024-10-04 21:07:26 +02:00
container: forgejo.neshweb.net/ci-docker-images/python-neshweb:3.11
2024-08-09 18:57:33 +02:00
steps:
- name: Checkout source code
2025-04-05 19:28:45 +02:00
uses: actions/checkout@v4
2024-08-09 18:57:33 +02:00
- name: Install packages
run: |
2024-10-05 15:09:05 +02:00
pip install -e .[lint] --disable-pip-version-check --no-cache-dir -q
2024-08-09 18:57:33 +02:00
python -m pip list --format=columns --disable-pip-version-check
- name: Run pylint
run: |
pylint --version
pylint **/*.py --exit-zero --rc-file pyproject.toml
mypy:
runs-on: docker
2024-10-04 21:07:26 +02:00
container: forgejo.neshweb.net/ci-docker-images/python-neshweb:3.11
2024-08-09 18:57:33 +02:00
steps:
- name: Checkout source code
2025-04-05 19:28:45 +02:00
uses: actions/checkout@v4
2024-08-09 18:57:33 +02:00
- name: Install packages
run: |
2024-10-05 15:09:05 +02:00
pip install -e .[typing] --disable-pip-version-check --no-cache-dir -q
2024-08-09 18:57:33 +02:00
python -m pip list --format=columns --disable-pip-version-check
- name: Run mypy
run: |
mypy --version
mypy .
2024-10-20 21:38:22 +02:00
tests:
runs-on: docker
2025-04-05 19:28:45 +02:00
strategy:
matrix:
2025-04-05 20:16:34 +02:00
container: [ "3.10", "3.11", "3.12", "3.13" ]
2025-04-05 19:53:43 +02:00
container: forgejo.neshweb.net/ci-docker-images/python-neshweb:${{ matrix.container }}
2024-10-20 21:38:22 +02:00
steps:
- name: Checkout source code
2025-04-05 19:28:45 +02:00
uses: actions/checkout@v4
2024-10-20 21:38:22 +02:00
- name: Install packages
run: |
2025-04-05 19:28:45 +02:00
python --version
2025-04-05 20:08:28 +02:00
python -m venv .venv
source .venv/bin/activate
echo $VIRTUAL_ENV
2024-10-20 21:38:22 +02:00
pip install -e .[testing] --disable-pip-version-check --no-cache-dir -q
python -m pip list --format=columns --disable-pip-version-check
- name: Run pytest
run: |
2025-04-05 20:11:56 +02:00
source .venv/bin/activate
2025-04-05 20:04:17 +02:00
python -m pytest