diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml index bfcc9380b..4f4172fd4 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/ci.yml @@ -77,10 +77,18 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} + key: uv-${{ hashFiles('uv.lock', 'pyproject.toml') }} restore-keys: | uv- + - name: Cache nox virtualenvs + uses: actions/cache@v3 + with: + path: .nox + key: nox-lint-${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock', 'pyproject.toml') }} + restore-keys: | + nox-lint-${{ env.PYTHON_VERSION }}- + - name: Run lint and format checks via nox run: | mkdir -p build @@ -124,10 +132,18 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} + key: uv-${{ hashFiles('uv.lock', 'pyproject.toml') }} restore-keys: | uv- + - name: Cache nox virtualenvs + uses: actions/cache@v3 + with: + path: .nox + key: nox-typecheck-${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock', 'pyproject.toml') }} + restore-keys: | + nox-typecheck-${{ env.PYTHON_VERSION }}- + - name: Run typecheck via nox run: | mkdir -p build @@ -170,10 +186,18 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} + key: uv-${{ hashFiles('uv.lock', 'pyproject.toml') }} restore-keys: | uv- + - name: Cache nox virtualenvs + uses: actions/cache@v3 + with: + path: .nox + key: nox-security-${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock', 'pyproject.toml') }} + restore-keys: | + nox-security-${{ env.PYTHON_VERSION }}- + - name: Run security scan and dead-code detection via nox run: | mkdir -p build @@ -217,10 +241,18 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} + key: uv-${{ hashFiles('uv.lock', 'pyproject.toml') }} restore-keys: | uv- + - name: Cache nox virtualenvs + uses: actions/cache@v3 + with: + path: .nox + key: nox-quality-${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock', 'pyproject.toml') }} + restore-keys: | + nox-quality-${{ env.PYTHON_VERSION }}- + - name: Run complexity check via nox run: | mkdir -p build @@ -288,10 +320,18 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} + key: uv-${{ hashFiles('uv.lock', 'pyproject.toml') }} restore-keys: | uv- + - name: Cache nox virtualenvs + uses: actions/cache@v3 + with: + path: .nox + key: nox-unit-tests-${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock', 'pyproject.toml') }} + restore-keys: | + nox-unit-tests-${{ env.PYTHON_VERSION }}- + - name: Run unit tests via nox run: | mkdir -p build @@ -364,10 +404,18 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} + key: uv-${{ hashFiles('uv.lock', 'pyproject.toml') }} restore-keys: | uv- + - name: Cache nox virtualenvs + uses: actions/cache@v3 + with: + path: .nox + key: nox-integration-tests-${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock', 'pyproject.toml') }} + restore-keys: | + nox-integration-tests-${{ env.PYTHON_VERSION }}- + - name: Run integration tests via nox run: | mkdir -p build @@ -517,10 +565,18 @@ jobs: uses: actions/cache@v3 with: path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} + key: uv-${{ hashFiles('uv.lock', 'pyproject.toml') }} restore-keys: | uv- + - name: Cache nox virtualenvs + uses: actions/cache@v3 + with: + path: .nox + key: nox-build-${{ env.PYTHON_VERSION }}-${{ hashFiles('uv.lock', 'pyproject.toml') }} + restore-keys: | + nox-build-${{ env.PYTHON_VERSION }}- + - name: Build wheel via nox run: | mkdir -p build @@ -544,10 +600,13 @@ jobs: retention-days: 30 docker: + # Only gate on unit_tests -- the most critical functional check. + # lint/typecheck/security/quality run in parallel and are not + # prerequisites for a successful Docker image build. # continue-on-error: true allows the status-check gate to pass even # when the docker:dind runner is unavailable (infrastructure issue). # The docker job still runs; only infrastructure failures are tolerated. - needs: [load-versions, lint, typecheck, security, quality, unit_tests] + needs: [unit_tests] continue-on-error: true runs-on: docker container: