Files
plba_v2/.gitea/workflows/ci.yml
T
2026-10-10 20:54:54 +03:00

52 lines
1.2 KiB
YAML

name: PLBA package CI
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
tests:
name: Python tests
runs-on: cloud-build
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Check Python version
run: |
python3 - <<'PY'
import sys
print(f"Using Python {sys.version.split()[0]}")
if sys.version_info < (3, 11):
raise SystemExit("PLBA v2 CI requires Python 3.11 or newer")
PY
- name: Install package and test dependencies
run: |
python3 -m venv .venv
.venv/bin/python -m pip install -e ".[test]"
- name: Run tests
run: .venv/bin/python -m pytest
package-version:
name: Package version increment
if: ${{ gitea.event_name == 'pull_request' }}
runs-on: cloud-build
steps:
- name: Check out repository and target branch history
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check package version increment
env:
BASE_REF: ${{ github.base_ref }}
run: |
test -n "$BASE_REF"
python3 scripts/check_package_version.py --base-ref "origin/${BASE_REF}"