From dd7f11738048d9a6807feb63eddd7b798779aff3 Mon Sep 17 00:00:00 2001 From: IluaAir Date: Thu, 11 Jun 2026 23:57:11 +0300 Subject: [PATCH] Add CI workflows for Gitea and GitHub - Created a CI workflow for Gitea with linting and testing jobs using Python versions 3.10 to 3.13. - Established a CI workflow for GitHub with similar linting and testing jobs, ensuring consistency across platforms. - Both workflows utilize the `uv` tool for dependency management and testing, enhancing the project's CI/CD capabilities. --- .gitea/workflows/ci.yml | 40 ++++++++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 .gitea/workflows/ci.yml create mode 100644 .github/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..b3189ca --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,40 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + lint: + runs-on: rassbery + container: catthehacker/ubuntu:act-22.04 + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v6 + - name: Sync dependencies + run: uv sync --group dev + - name: Ruff lint + run: uv run ruff check --output-format=github . + - name: Ruff format check + run: uv run ruff format --check . + + test: + runs-on: rassbery + container: catthehacker/ubuntu:act-22.04 + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + python-version: ${{ matrix.python-version }} + - name: Sync dependencies + run: uv sync --group dev + - name: Run tests + run: uv run pytest -q diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f5da988 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v6 + - name: Sync dependencies + run: uv sync --group dev + - name: Ruff lint + run: uv run ruff check --output-format=github . + - name: Ruff format check + run: uv run ruff format --check . + + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12", "3.13"] + steps: + - uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v6 + with: + python-version: ${{ matrix.python-version }} + - name: Sync dependencies + run: uv sync --group dev + - name: Run tests + run: uv run pytest -q