diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 3f9ec0c..6265196 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -1,27 +1,32 @@ name: CI on: [push, pull_request] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: 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 - run: | - pip3 install --upgrade pip - pip3 install pytest click pyyaml rich - pip3 install -e . + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' - - name: Tests + - name: Install dependencies run: | - (pytest tests/ -v --tb=short && echo "TESTS_PASSED") || echo "TESTS_COMPLETED" + python3 -m pip install --upgrade pip + python3 -m pip install pytest ruff click pyyaml rich + python3 -m pip install -e . - - name: Lint + - name: Run tests run: | - (pip3 install ruff && ruff check i18n_key_sync/ tests/ && echo "LINT_PASSED") || echo "LINT_COMPLETED" + python3 -m pytest tests/ -v --tb=short - - name: Done - run: echo "CI workflow execution completed" + - name: Run linting + run: | + python3 -m ruff check i18n_key_sync/ tests/