name: CI on: [push, pull_request] jobs: test: runs-on: ubuntu-latest steps: - name: Checkout run: | git clone https://${{ gitea.server }}/${{ gitea.repository }} . git checkout ${{ gitea.sha }} - name: Install Python deps run: | python3 -m pip install --upgrade pip -q python3 -m pip install pytest ruff -q - name: Run tests run: | set +e python3 -m pytest tests/ -v --tb=short TEST_EXIT=$? set -e if [ $TEST_EXIT -ne 0 ]; then echo "Tests failed with exit code $TEST_EXIT" exit $TEST_EXIT fi echo "Tests passed" - name: Run linting run: | python3 -m ruff check i18n_key_sync/ tests/ || echo "Linting had issues"