Some checks failed
Lint Code / lint (push) Successful in 48s
Run Tests / test (3.12) (push) Successful in 39s
Run Tests / test (3.13) (push) Successful in 35s
CI/CD Pipeline / lint (push) Successful in 0s
Build and Release / build (push) Successful in 35s
CI/CD Pipeline / test (push) Has been skipped
CI/CD Pipeline / build-and-release (push) Has been skipped
Build and Release / release (push) Failing after 17s
CI/CD Pipeline / notify (push) Successful in 1s
53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
name: Lint Code
|
|
run-name: ${{ gitea.actor }} started code linting
|
|
on:
|
|
push:
|
|
branches: ["*"]
|
|
pull_request:
|
|
branches: ["*"]
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install Poetry
|
|
uses: snok/install-poetry@v1
|
|
with:
|
|
version: latest
|
|
virtualenvs-create: true
|
|
virtualenvs-in-project: true
|
|
|
|
- name: Load cached venv
|
|
id: cached-poetry-dependencies
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: .venv
|
|
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
|
|
|
|
- name: Install dependencies
|
|
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
|
|
run: poetry install --with dev
|
|
|
|
# - name: Run Black (Code formatting check)
|
|
# run: poetry run black --check pyserve/
|
|
|
|
# - name: Run isort (Import sorting check)
|
|
# run: poetry run isort --check-only pyserve/
|
|
|
|
- name: Run flake8 (Linting)
|
|
run: poetry run flake8 pyserve/
|
|
|
|
- name: Run mypy (Type checking)
|
|
run: poetry run mypy pyserve/
|
|
|
|
- name: Lint completed
|
|
run: echo "Code passed all linting checks!"
|