Files
kaya/.gitea/workflows/build.yaml
T
woggioni fa3ff32f66 Implemented modular code structure
Refactored repository into kaya-core and kaya-rsgi packages
2026-07-15 22:18:45 +08:00

43 lines
1.5 KiB
YAML

name: CI
on:
push:
tags:
- '*'
jobs:
build_pip_package:
name: "Build Pip package"
runs-on: hostinger
timeout-minutes: 30
container:
image: gitea.woggioni.net/woggioni/gitea-runner/ubuntu:26.04
steps:
- name: Checkout sources
uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- uses: actions/setup-python@v6
with:
python-version: '3.14.6'
cache: 'pip'
- name: Install dependencies
run: |
python -m venv .venv
.venv/bin/pip install -r requirements-dev.txt
- name: Unit tests
run: |
.venv/bin/pip install packages/kaya-core packages/kaya-rsgi
.venv/bin/python -m mypy -p kaya.core
.venv/bin/python -m mypy -p kaya.rsgi
.venv/bin/python -m unittest discover -s packages/kaya-core/tests
.venv/bin/python -m unittest discover -s packages/kaya-rsgi/tests
- name: Publish artifacts
env:
TWINE_REPOSITORY_URL: ${{ vars.PYPI_REGISTRY_URL }}
TWINE_USERNAME: ${{ vars.PUBLISHER_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PUBLISHER_TOKEN }}
run: |
.venv/bin/pyproject-build packages/kaya-core
.venv/bin/pyproject-build packages/kaya-rsgi
.venv/bin/twine upload --repository gitea packages/kaya-core/dist/*.whl packages/kaya-core/dist/*.tar.gz packages/kaya-rsgi/dist/*.whl packages/kaya-rsgi/dist/*.tar.gz