From d799fdaddcf98b36904c893e76d14111311e2c09 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Mon, 2 Feb 2026 04:11:46 +0000 Subject: [PATCH] fix: use GitHub Actions compatible syntax for Gitea --- .gitea/workflows/ci.yml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 4ec06fe..f748210 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,29 +1,32 @@ name: CI -on: [push, pull_request] +on: + push: + branches: [main] + pull_request: + branches: [main] jobs: test: - runs-on: gitea + runs-on: ubuntu-latest steps: - - name: Checkout - run: | - git clone https://${{ gitea.server }}/${{ gitea.repository }} . - git checkout ${{ gitea.sha }} + - uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: Setup Python - run: | - python3 -m pip install --upgrade pip + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' - name: Install dependencies run: | + python3 -m pip install --upgrade pip python3 -m pip install pytest ruff python3 -m pip install -e ".[dev]" - name: Run tests - run: | - python3 -m pytest tests/ -v --tb=short + run: python3 -m pytest tests/ -v --tb=short - - name: Lint - run: | - python3 -m ruff check i18n_key_sync/ tests/ + - name: Run linting + run: python3 -m ruff check i18n_key_sync/ tests/