mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-09-12 19:50:57 +05:00
Speed release image pipeline [skip ci]
This commit is contained in:
parent
7b5e7705fe
commit
b3b286694d
9
.github/workflows/ci.yml
vendored
9
.github/workflows/ci.yml
vendored
@ -19,36 +19,43 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
if: github.event_name != 'push' || github.event.head_commit.author.email != 'release-bot@archivebox.io'
|
||||
name: Linters
|
||||
uses: ./.github/workflows/lint.yml
|
||||
secrets: inherit
|
||||
|
||||
install-cli-platform:
|
||||
if: github.event_name != 'push' || github.event.head_commit.author.email != 'release-bot@archivebox.io'
|
||||
name: Install and CLI platform compatibility
|
||||
uses: ./.github/workflows/test.yml
|
||||
secrets: inherit
|
||||
|
||||
tests:
|
||||
if: github.event_name != 'push' || github.event.head_commit.author.email != 'release-bot@archivebox.io'
|
||||
name: Discovered test matrix
|
||||
uses: ./.github/workflows/test-parallel.yml
|
||||
secrets: inherit
|
||||
|
||||
documentation:
|
||||
if: github.event_name != 'push' || github.event.head_commit.author.email != 'release-bot@archivebox.io'
|
||||
name: Documentation and root tests
|
||||
uses: ./.github/workflows/docs.yml
|
||||
secrets: inherit
|
||||
|
||||
codeql:
|
||||
if: github.event_name != 'push' || github.event.head_commit.author.email != 'release-bot@archivebox.io'
|
||||
name: CodeQL
|
||||
uses: ./.github/workflows/codeql.yml
|
||||
secrets: inherit
|
||||
|
||||
python-artifacts:
|
||||
if: github.event_name != 'push' || github.event.head_commit.author.email != 'release-bot@archivebox.io'
|
||||
name: Tested Python artifacts
|
||||
uses: ./.github/workflows/pip.yml
|
||||
secrets: inherit
|
||||
|
||||
docker-digests:
|
||||
if: github.event_name != 'push' || github.event.head_commit.author.email != 'release-bot@archivebox.io'
|
||||
name: Tested Docker images
|
||||
uses: ./.github/workflows/docker.yml
|
||||
with:
|
||||
@ -57,7 +64,7 @@ jobs:
|
||||
|
||||
required:
|
||||
name: All required CI lanes
|
||||
if: ${{ always() }}
|
||||
if: ${{ always() && (github.event_name != 'push' || github.event.head_commit.author.email != 'release-bot@archivebox.io') }}
|
||||
needs:
|
||||
- lint
|
||||
- install-cli-platform
|
||||
|
||||
1
.github/workflows/deploy-publicsite.yml
vendored
1
.github/workflows/deploy-publicsite.yml
vendored
@ -27,6 +27,7 @@ concurrency:
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
if: github.event_name != 'push' || github.event.head_commit.author.email != 'release-bot@archivebox.io'
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
|
||||
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@ -207,6 +207,8 @@ jobs:
|
||||
ARCHIVEBOX_COMMIT_HASH=${{ github.sha }}
|
||||
pull: true
|
||||
platforms: ${{ matrix.platform }}
|
||||
cache-from: type=gha,scope=${{ matrix.cache_scope }}
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.cache_scope }}
|
||||
outputs: |
|
||||
type=docker,name=${{ matrix.local_tag }}
|
||||
type=oci,dest=${{ runner.temp }}/archivebox-image.tar
|
||||
@ -227,6 +229,8 @@ jobs:
|
||||
ARCHIVEBOX_COMMIT_HASH=${{ github.sha }}
|
||||
pull: true
|
||||
platforms: ${{ matrix.platform }}
|
||||
cache-from: type=gha,scope=${{ matrix.cache_scope }}
|
||||
cache-to: type=gha,mode=max,scope=${{ matrix.cache_scope }}
|
||||
|
||||
- name: Image digest
|
||||
if: inputs.push_digests
|
||||
|
||||
49
.github/workflows/pip.yml
vendored
49
.github/workflows/pip.yml
vendored
@ -64,6 +64,22 @@ jobs:
|
||||
Path("dist/SHA256SUMS").write_text("\n".join(checksum_lines) + "\n")
|
||||
PY
|
||||
|
||||
- name: Release wheel import and CLI smoke
|
||||
if: ${{ !inputs.full_tests }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
shopt -s nullglob
|
||||
wheels=(dist/archivebox-*.whl)
|
||||
[[ "${#wheels[@]}" -eq 1 ]]
|
||||
smoke_env="$(mktemp -d)/.venv"
|
||||
uv venv --python 3.13 "$smoke_env"
|
||||
uv pip install --no-cache --python "$smoke_env" "${wheels[0]}"
|
||||
unset PYTHONPATH
|
||||
cd "$(mktemp -d)"
|
||||
VIRTUAL_ENV="$smoke_env" uv run --no-cache --active --no-project --no-sync python -c 'import archivebox'
|
||||
VIRTUAL_ENV="$smoke_env" uv run --no-cache --active --no-project --no-sync archivebox version
|
||||
|
||||
- name: Upload every distribution
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
with:
|
||||
@ -226,36 +242,3 @@ jobs:
|
||||
fi
|
||||
sudo rm -rf "$root_tool_dir"
|
||||
fi
|
||||
|
||||
release-smoke:
|
||||
name: Release wheel import and CLI smoke
|
||||
if: ${{ !inputs.full_tests }}
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
|
||||
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6
|
||||
with:
|
||||
version: ${{ env.UV_VERSION }}
|
||||
enable-cache: false
|
||||
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
|
||||
with:
|
||||
name: python-distributions
|
||||
path: ${{ runner.temp }}/python-distributions
|
||||
|
||||
- name: Install the wheel and verify import and CLI version
|
||||
shell: bash
|
||||
run: |
|
||||
set -Eeuo pipefail
|
||||
shopt -s nullglob
|
||||
wheels=("$RUNNER_TEMP"/python-distributions/archivebox-*.whl)
|
||||
[[ "${#wheels[@]}" -eq 1 ]]
|
||||
smoke_env="$(mktemp -d)/.venv"
|
||||
uv venv --python 3.13 "$smoke_env"
|
||||
uv pip install --no-cache --python "$smoke_env" "${wheels[0]}"
|
||||
unset PYTHONPATH
|
||||
cd "$(mktemp -d)"
|
||||
VIRTUAL_ENV="$smoke_env" uv run --no-cache --active --no-project --no-sync python -c 'import archivebox'
|
||||
VIRTUAL_ENV="$smoke_env" uv run --no-cache --active --no-project --no-sync archivebox version
|
||||
|
||||
@ -30,9 +30,8 @@ def test_release_uses_registered_publisher_and_authorized_tag_credentials():
|
||||
candidate = yaml.safe_load(RELEASE_CANDIDATE_WORKFLOW.read_text())
|
||||
assert candidate["jobs"]["python-artifacts"]["with"]["full_tests"] is False
|
||||
pip_workflow = yaml.safe_load(PIP_WORKFLOW.read_text())
|
||||
release_smoke = pip_workflow["jobs"]["release-smoke"]
|
||||
install_script = next(
|
||||
step["run"] for step in release_smoke["steps"] if step.get("name") == "Install the wheel and verify import and CLI version"
|
||||
step["run"] for step in pip_workflow["jobs"]["build"]["steps"] if step.get("name") == "Release wheel import and CLI smoke"
|
||||
)
|
||||
assert "uv pip install --no-cache" in install_script
|
||||
assert "import archivebox" in install_script
|
||||
|
||||
Loading…
Reference in New Issue
Block a user