diff --git a/.gitea/workflows/latest.yaml b/.gitea/workflows/latest.yaml index 3ceb4df..be8a17f 100644 --- a/.gitea/workflows/latest.yaml +++ b/.gitea/workflows/latest.yaml @@ -15,13 +15,30 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Install uv - uses: astral-sh/setup-uv@v3 + uses: astral-sh/setup-uv@v5 + with: + github-token: ${{ secrets._GITHUB_TOKEN }} + enable-cache: true - name: Set up Python run: uv python install + - name: Cache uv + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/.cache/uv + key: uv-cache-${{ runner.os }} + restore-keys: uv-cache-${{ runner.os }} + - name: Install the project - run: uv sync + run: uv sync --no-install-project --cache-dir ${{ github.workspace }}/.cache/uv + + - name: Cache pre-commit + uses: actions/cache@v4 + with: + path: ~/.cache/pre-commit + key: pre-commit-cache-${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }} + restore-keys: pre-commit-cache-${{ runner.os }}- - name: Linter & Formatter run: uv run pre-commit run --all-files