Илья Глазунов 537b783726
Some checks failed
Lint Code / lint (push) Failing after 2m2s
CI/CD Pipeline / lint (push) Successful in 0s
Run Tests / test (3.12) (push) Successful in 54s
CI/CD Pipeline / build-and-release (push) Has been cancelled
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / notify (push) Has been cancelled
Run Tests / test (3.13) (push) Has been cancelled
Add CI/CD pipeline, logging enhancements, and release management
- Create a GitHub Actions workflow for testing with Python 3.12 and 3.13.
- Update Makefile to include release management commands and pipeline checks.
- Document the CI/CD pipeline structure and usage in PIPELINE.md.
- Add structlog for structured logging and enhance logging utilities.
- Implement release management script for automated versioning and tagging.
- Modify logging configuration to support structured logging and improved formatting.
- Update dependencies in pyproject.toml and poetry.lock to include structlog.
- Enhance access logging in server and middleware to include structured data.
2025-09-03 00:13:21 +03:00

57 lines
1.6 KiB
YAML

name: Run Tests
run-name: ${{ gitea.actor }} started tests
on:
push:
branches: ["dev", "master", "main"]
pull_request:
branches: ["dev", "master", "main"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12', '3.13']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- 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 }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --with dev
- name: Run tests
run: poetry run pytest tests/ -v
- name: Run tests with coverage
run: poetry run pytest tests/ -v --cov=pyserve --cov-report=xml --cov-report=term
- name: Upload coverage to artifacts
uses: actions/upload-artifact@v3
with:
name: coverage-report-${{ matrix.python-version }}
path: coverage.xml
- name: Tests completed
run: echo "All tests passed successfully on Python ${{ matrix.python-version }}!"