Speed up CI setup without reducing coverage

This commit is contained in:
Nick Sweeting 2026-07-25 18:47:03 -07:00
parent 93b5f6a6db
commit 3d67c6b370
No known key found for this signature in database
8 changed files with 24 additions and 6 deletions

View File

@ -52,7 +52,7 @@ jobs:
name: Tested Docker images
uses: ./.github/workflows/docker.yml
with:
push_digests: ${{ github.event_name == 'push' && github.ref == 'refs/heads/dev' }}
push_digests: false
secrets: inherit
required:

View File

@ -49,6 +49,8 @@ jobs:
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Resolve Docker through abxpkg
env:

View File

@ -26,6 +26,8 @@ jobs:
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Install ArchiveBox development dependencies
run: uv sync --locked --dev
- name: Resolve documentation tools through abxpkg
@ -79,6 +81,8 @@ jobs:
if: ${{ !contains(fromJSON('["freebsd", "openbsd"]'), matrix.environment) }}
with:
version: "0.11.3"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Install ArchiveBox
if: ${{ !contains(fromJSON('["freebsd", "openbsd"]'), matrix.environment) }}
run: uv sync --locked --dev

View File

@ -25,7 +25,8 @@ jobs:
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
enable-cache: false
enable-cache: true
cache-dependency-glob: uv.lock
- name: Verify checked dependency lock
run: uv lock --check

View File

@ -23,7 +23,8 @@ jobs:
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: ${{ env.UV_VERSION }}
enable-cache: false
enable-cache: true
cache-dependency-glob: uv.lock
- name: Build every distribution
run: |
@ -86,7 +87,8 @@ jobs:
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: ${{ env.UV_VERSION }}
enable-cache: false
enable-cache: true
cache-dependency-glob: uv.lock
- name: Download distributions
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4

View File

@ -30,7 +30,8 @@ jobs:
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
enable-cache: false
enable-cache: true
cache-dependency-glob: uv.lock
- name: Resolve discovery tools through abxpkg
env:
@ -95,6 +96,8 @@ jobs:
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Resolve optional build dependencies through abxpkg
if: matrix.test.extra != ''

View File

@ -46,6 +46,8 @@ jobs:
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
version: "0.11.3"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Prepare abxpkg environment
env:
@ -195,6 +197,8 @@ jobs:
uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
with:
version: "0.11.3"
enable-cache: true
cache-dependency-glob: uv.lock
- name: Resolve Docker and curl through abxpkg
env:

View File

@ -174,8 +174,10 @@ def ServerSecurityModeMiddleware(get_response):
if base_config.SERVER_SECURITY_MODE == "auto" and request.method.upper() not in allowed_methods:
request_host, _request_port = split_host_port((request.get_host() or "").lower())
base_host, _base_port = split_host_port(get_base_host(config=base_config))
admin_host, _admin_port = split_host_port(get_admin_host(config=base_config))
api_host, _api_port = split_host_port(get_api_host(config=base_config))
control_hosts = {host for host in (base_host, api_host) if host}
web_host, _web_port = split_host_port(get_web_host(config=base_config))
control_hosts = {host for host in (base_host, admin_host, api_host, web_host) if host}
if control_hosts and request_host not in control_hosts:
return HttpResponseForbidden("ArchiveBox is running with the control plane disabled on this host.")