52 lines
1.4 KiB
YAML
52 lines
1.4 KiB
YAML
name: Gitea CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- feature/**
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Install dependencies
|
|
run: pip install ".[dev]"
|
|
|
|
- name: Session handover gate
|
|
run: python3 scripts/session_handover_check.py --strict
|
|
|
|
- name: Validate governance assets
|
|
run: |
|
|
RANGE=""
|
|
if [ "${{ github.event_name }}" = "pull_request" ] && [ -n "${{ github.event.pull_request.base.sha }}" ]; then
|
|
RANGE="${{ github.event.pull_request.base.sha }}...${{ github.sha }}"
|
|
elif [ -n "${{ github.event.before }}" ] && [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
|
|
RANGE="${{ github.event.before }}...${{ github.sha }}"
|
|
fi
|
|
if [ -n "$RANGE" ]; then
|
|
python3 scripts/validate_governance_assets.py "$RANGE"
|
|
else
|
|
python3 scripts/validate_governance_assets.py
|
|
fi
|
|
|
|
- name: Validate Ouroboros docs
|
|
run: python3 scripts/validate_ouroboros_docs.py
|
|
|
|
- name: Lint
|
|
run: ruff check src/ tests/
|
|
|
|
- name: Run tests with coverage
|
|
run: pytest -v --cov=src --cov-report=term-missing --cov-fail-under=80
|