This commit is contained in:
44
.gitea/workflows/ci.yaml
Normal file
44
.gitea/workflows/ci.yaml
Normal file
@@ -0,0 +1,44 @@
|
||||
# SPDX-FileCopyrightText: 2025 Alexander Kalinovsky <a@k8y.ru>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- "3.13"
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up uv
|
||||
uses: astral-sh/setup-uv@v4
|
||||
with:
|
||||
enable-cache: true
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
uv sync --all-extras --dev
|
||||
- name: Ruff (lint + format check)
|
||||
run: |
|
||||
uv run ruff check .
|
||||
uv run ruff format --check
|
||||
- name: MyPy
|
||||
run: |
|
||||
uv run mypy src
|
||||
- name: Pytest
|
||||
run: |
|
||||
uv run pytest
|
||||
|
||||
35
.gitea/workflows/release-testpypi.yaml
Normal file
35
.gitea/workflows/release-testpypi.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
# SPDX-FileCopyrightText: 2025 Alexander Kalinovsky <a@k8y.ru>
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
name: Publish to TestPyPI
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*.*.*rc*"
|
||||
- "v*.*.*a*"
|
||||
- "v*.*.*b*"
|
||||
|
||||
build-publish:
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up uv
|
||||
uses: astral-sh/setup-uv@v4
|
||||
with:
|
||||
enable-cache: true
|
||||
python-version: "3.13"
|
||||
- name: Build wheel & sdist
|
||||
run: |
|
||||
uv build
|
||||
- name: Publish (TestPyPI)
|
||||
run: |
|
||||
uv publish --repository-url https://test.pypi.org/legacy/ --skip-existing
|
||||
|
||||
Reference in New Issue
Block a user