# pytest-allure-host




[](https://darrenrabbs.github.io/allurehosting/)
[](https://github.com/darrenrabbs/allurehosting-cdk)
Publish Allure static reports to private S3 behind CloudFront with history preservation and SPA-friendly routing.
Optional infrastructure (AWS CDK stack to provision the private S3 bucket + CloudFront OAC distribution) lives externally: https://github.com/darrenrabbs/allurehosting-cdk
See `docs/architecture.md` and `.github/copilot-instructions.md` for architecture and design constraints.
## Documentation
Full documentation (quickstart, AWS setup, IAM least-privilege, CLI usage, changelog) is published at:
https://darrenrabbs.github.io/allurehosting/
The README intentionally stays lean—refer to the site for detailed guidance.
## Features
- Generate Allure static report from `allure-results`
- Preserve history by pulling `latest/history` before generation
- Upload to S3 under `<project>/<branch>/<run_id>/` and update `<project>/<branch>/latest/`
- Two-phase latest update: upload to `latest_tmp/`, swap into `latest/`, write `LATEST_READY` marker
- Optional retention: keep only N newest runs (`--max-keep-runs`)
- Correct caching headers: `index.html` and `widgets/` → `no-cache`; assets → immutable
- Optional TTL tagging on objects (`--ttl-days`) for S3 lifecycle policies
- Optional summary JSON output for CI
- Best-effort manifest at `runs/index.json` with new run metadata
- Lightweight pointer file `latest.json` (branch root)
- Human-friendly HTML index at `runs/index.html` for navigating past runs
- Columns: Run ID, raw epoch, UTC Time (human readable), Size (pretty units), P/F/B (passed/failed/broken counts), links to the immutable run and the moving latest
- Newest run highlighted with a star (★) and soft background
## Quick start
```bash
# Install the publisher
pip install pytest-allure-host
# Run your test suite and produce allure-results/
pytest --alluredir=allure-results
# Plan (no uploads) – shows what would be published
publish-allure \
--bucket my-allure-bucket \
--project myproj \
--branch main \
--dry-run --summary-json plan.json
# Real publish (requires AWS creds: env vars, profile, or OIDC)
publish-allure \
--bucket my-allure-bucket \
--project myproj \
--branch main
```
Notes:
- `--prefix` defaults to `reports`; omit unless you need a different root.
- `--branch` defaults to `$GIT_BRANCH` or `main` if unset.
- Add `--cloudfront https://reports.example.com` to print CDN URLs.
- Use `--check` to preflight (AWS / allure binary / inputs) before a real run.
- Add `--context-url https://jira.example.com/browse/PROJ-123` to link a change ticket in the runs index.
- Use `--dry-run` + `--summary-json` in CI for a planning stage artifact.
- Provide `--ttl-days` and/or `--max-keep-runs` for lifecycle & cost controls.
## Requirements
- Python 3.9+
- AWS credentials with S3 access to the target bucket
- Allure commandline available on PATH (e.g., via Allure CLI or allure-pytest)
## S3 layout and caching
- Keys:
- `s3://<bucket>/<prefix>/<project>/<branch>/<run_id>/...`
- `s3://<bucket>/<prefix>/<project>/<branch>/latest/...`
- `s3://<bucket>/<prefix>/<project>/<branch>/runs/index.json` (manifest)
- `s3://<bucket>/<prefix>/<project>/<branch>/runs/index.html` (HTML index)
- `s3://<bucket>/<prefix>/<project>/<branch>/latest.json` (pointer)
- Two-phase swap writes a `LATEST_READY` marker file under `latest/` when ready.
- Cache-Control:
- `index.html`: `no-cache`
- files under `widgets/`: `no-cache`
- everything else: `public, max-age=31536000, immutable`
## CLI usage
Install locally for development:
```bash
pip install -e .[dev]
```
Run the publisher after tests generate `allure-results`:
```bash
publish-allure \
--bucket your-bucket \
--prefix reports \
--project demo \
--branch main \
--cloudfront https://reports.example.com \
--ttl-days 30 \
--max-keep-runs 10
```
Flags (CLI):
- `--bucket` (required): S3 bucket name
- `--prefix` (default: `reports`): Root prefix
- `--project` (required): Project name
- `--branch` (default: `$GIT_BRANCH` or `main`)
- `--run-id` (default: `$ALLURE_RUN_ID` or `YYYYMMDD-HHMMSS`)
- `--cloudfront` (optional; default: `$ALLURE_CLOUDFRONT`)
- `--results` (default: `allure-results`): Input directory
- `--report` (default: `allure-report`): Output directory
- `--ttl-days` (optional): Add `ttl-days=<N>` object tag
- `--max-keep-runs` (optional): Keep N newest run prefixes, delete older
- `--summary-json <path>`: Write machine-readable summary
- `--check`: Preflight validation (AWS access, allure, inputs)
- `--dry-run`: Print planned prefixes and sample headers, no upload
- `--s3-endpoint`: Custom S3 endpoint (e.g. `http://localhost:4566` for LocalStack)
Environment fallbacks:
- `GIT_BRANCH` → `--branch` default
- `ALLURE_RUN_ID` → `--run-id` default
- `ALLURE_CLOUDFRONT` → `--cloudfront` default
- `ALLURE_S3_ENDPOINT` → `--s3-endpoint` default (LocalStack / custom S3)
## Pytest plugin usage
Run tests and publish during terminal summary:
```bash
pytest \
--allure-bucket your-bucket \
--allure-prefix reports \
--allure-project demo \
--allure-branch main \
--allure-cloudfront https://reports.example.com \
--allure-ttl-days 30 \
--allure-max-keep-runs 10
```
Flags (pytest):
- `--allure-bucket` (required)
- `--allure-prefix` (default: `reports`)
- `--allure-project` (required)
- `--allure-branch` (default: `$GIT_BRANCH` or `main`)
- `--allure-run-id` (default: `$ALLURE_RUN_ID` or `YYYYMMDD-HHMMSS`)
- `--allure-cloudfront` (optional; default: `$ALLURE_CLOUDFRONT`)
- `--allure-ttl-days` (optional)
- `--allure-max-keep-runs` (optional)
- `--allure-summary-json <path>` (optional)
- `--allure-check` / `--allure-dry-run` (optional)
## Preflight and dry-run
- `--check`/`--allure-check` verifies:
- S3 bucket reachability (HeadBucket/List)
- `allure-results` exists and is non-empty
- Allure CLI exists on PATH
- `--dry-run`/`--allure-dry-run` prints planned prefixes and sample headers; no uploads occur.
## Outputs
- S3 prefixes: run and latest
- Optional CDN URLs (if `--cloudfront` provided)
- `runs/index.json` manifest updated with new run entry
- `runs/index.html` HTML table of recent runs (newest first) with columns: Run ID, Epoch, UTC Time, Size, P/F/B, Run, Latest (newest row highlighted with ★)
- `latest.json` pointer to current run (simple machine-readable metadata)
- Optional `--summary-json` with sizes, file counts, and destination URLs
- `latest/LATEST_READY` marker indicates the swap is complete
## Security
See `SECURITY.md` for how to report vulnerabilities. Never open a public issue containing sensitive details.
## Badges / Status
- CI: multi-version test matrix + lint/security
- CodeQL: static code analysis
## Contributing
See `CONTRIBUTING.md` and follow the pre-commit hooks (`pre-commit install`).
## Release
Tagged versions (`vX.Y.Z`) are published to PyPI automatically via GitHub OIDC.
## CI examples
GitHub Actions (CLI):
```yaml
jobs:
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: "3.11" }
- run: pip install .[dev]
- run: pytest -q
- name: Publish Allure
env:
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GIT_BRANCH: ${{ github.ref_name }}
run: >-
publish-allure --bucket $BUCKET --prefix reports --project demo
--branch "$GIT_BRANCH" --cloudfront https://reports.example.com
--ttl-days 30 --max-keep-runs 10
```
Pytest-driven (plugin):
```yaml
- run: pytest -q \
--allure-bucket $BUCKET \
--allure-prefix reports \
--allure-project demo \
--allure-branch "$GIT_BRANCH" \
--allure-cloudfront https://reports.example.com \
--allure-ttl-days 30 \
--allure-max-keep-runs 10
```
### Minimal publish-only workflow
Create `.github/workflows/allure-publish.yml` for a lightweight pipeline that runs tests, generates the report, and publishes it (using secrets for the bucket and AWS credentials):
```yaml
name: allure-publish
on: [push, pull_request]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install deps (minimal)
run: pip install pytest pytest-allure-host allure-pytest
- name: Run tests
run: pytest --alluredir=allure-results -q
- name: Publish Allure report (dry-run on PRs)
env:
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
ALLURE_BUCKET: ${{ secrets.ALLURE_BUCKET }}
run: |
EXTRA=""
if [ "${{ github.event_name }}" = "pull_request" ]; then EXTRA="--dry-run"; fi
publish-allure \
--bucket "$ALLURE_BUCKET" \
--project myproj \
--branch "${{ github.ref_name }}" \
--summary-json summary.json $EXTRA
- name: Upload publish summary (always)
if: always()
uses: actions/upload-artifact@v4
with:
name: allure-summary
path: summary.json
```
Notes:
- Add `--cloudfront https://reports.example.com` if you have a CDN domain.
- Add `--context-url ${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.pull_request.number }}` inside PRs to link the run to its PR.
- Use `--max-keep-runs` / `--ttl-days` to manage storage costs.
- For LocalStack-based tests, set `--s3-endpoint` and export `ALLURE_S3_ENDPOINT` in `env:`.
## Troubleshooting
- Missing Allure binary: ensure the Allure CLI is installed and on PATH.
- Access denied: verify AWS credentials and bucket IAM for Put/Get/List/Delete.
- SPA routing 403/404: configure CloudFront error mapping to `/index.html`.
## Development
- Install with Poetry: `poetry install`
- Run tests: `poetry run pytest -q`
- Lint (security quick): `poetry run bandit -r pytest_allure_host`
- Unified lint helper (mirrors CI):
```bash
scripts/lint.sh # check mode (ruff lint+format check, bandit, pip-audit)
scripts/lint.sh --fix # apply ruff fixes + format
scripts/lint.sh pre-commit # also run pre-commit hooks on all files
```
## Quick local trial (macOS)
This section walks you through a minimal end-to-end run locally.
1. Prereqs
- AWS credentials configured (via `AWS_PROFILE` or access keys); set `AWS_REGION`.
- Allure CLI installed on PATH:
```bash
brew install allure
```
- Python deps installed:
```bash
poetry install
# or
pip install -e .[dev]
```
2. Generate Allure results
- Create a tiny test (optional example):
```bash
mkdir -p tests
cat > tests/test_sample.py <<'PY'
def test_ok():
assert True
PY
```
- Run pytest to emit results:
```bash
poetry run pytest --alluredir=allure-results
```
3. Preflight and dry-run
```bash
poetry run publish-allure \
--bucket <bucket> \
--prefix reports \
--project demo \
--branch $(git rev-parse --abbrev-ref HEAD) \
--cloudfront https://<cloudfront_domain> \
--check \
--dry-run
```
4. Publish
```bash
poetry run publish-allure \
--bucket <bucket> \
--prefix reports \
--project demo \
--branch $(git rev-parse --abbrev-ref HEAD) \
--cloudfront https://<cloudfront_domain> \
--ttl-days 30 \
--max-keep-runs 5
```
5. Verify
- S3: `reports/demo/<branch>/<run_id>/...` and `reports/demo/<branch>/latest/` with `LATEST_READY`.
- CDN: open printed `run_url` / `latest_url`.
Raw data
{
"_id": null,
"home_page": null,
"name": "pytest-allure-host",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": "allure, pytest, aws, s3, cloudfront, reporting",
"author": "Allure Hosting Maintainers",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/98/8e/cbfd7b47e871e3ac5411ab5ad8bbe69f237e698ef6088fb33467b0d87ef6/pytest_allure_host-2.0.1.tar.gz",
"platform": null,
"description": "# pytest-allure-host\n\n\n\n\n\n[](https://darrenrabbs.github.io/allurehosting/)\n[](https://github.com/darrenrabbs/allurehosting-cdk)\n\nPublish Allure static reports to private S3 behind CloudFront with history preservation and SPA-friendly routing.\n\nOptional infrastructure (AWS CDK stack to provision the private S3 bucket + CloudFront OAC distribution) lives externally: https://github.com/darrenrabbs/allurehosting-cdk\n\nSee `docs/architecture.md` and `.github/copilot-instructions.md` for architecture and design constraints.\n\n## Documentation\n\nFull documentation (quickstart, AWS setup, IAM least-privilege, CLI usage, changelog) is published at:\n\nhttps://darrenrabbs.github.io/allurehosting/\n\nThe README intentionally stays lean\u2014refer to the site for detailed guidance.\n\n## Features\n\n- Generate Allure static report from `allure-results`\n- Preserve history by pulling `latest/history` before generation\n- Upload to S3 under `<project>/<branch>/<run_id>/` and update `<project>/<branch>/latest/`\n- Two-phase latest update: upload to `latest_tmp/`, swap into `latest/`, write `LATEST_READY` marker\n- Optional retention: keep only N newest runs (`--max-keep-runs`)\n- Correct caching headers: `index.html` and `widgets/` \u2192 `no-cache`; assets \u2192 immutable\n- Optional TTL tagging on objects (`--ttl-days`) for S3 lifecycle policies\n- Optional summary JSON output for CI\n- Best-effort manifest at `runs/index.json` with new run metadata\n- Lightweight pointer file `latest.json` (branch root)\n- Human-friendly HTML index at `runs/index.html` for navigating past runs\n - Columns: Run ID, raw epoch, UTC Time (human readable), Size (pretty units), P/F/B (passed/failed/broken counts), links to the immutable run and the moving latest\n - Newest run highlighted with a star (\u2605) and soft background\n\n## Quick start\n\n```bash\n# Install the publisher\npip install pytest-allure-host\n\n# Run your test suite and produce allure-results/\npytest --alluredir=allure-results\n\n# Plan (no uploads) \u2013 shows what would be published\npublish-allure \\\n --bucket my-allure-bucket \\\n --project myproj \\\n --branch main \\\n --dry-run --summary-json plan.json\n\n# Real publish (requires AWS creds: env vars, profile, or OIDC)\npublish-allure \\\n --bucket my-allure-bucket \\\n --project myproj \\\n --branch main\n```\n\nNotes:\n\n- `--prefix` defaults to `reports`; omit unless you need a different root.\n- `--branch` defaults to `$GIT_BRANCH` or `main` if unset.\n- Add `--cloudfront https://reports.example.com` to print CDN URLs.\n- Use `--check` to preflight (AWS / allure binary / inputs) before a real run.\n- Add `--context-url https://jira.example.com/browse/PROJ-123` to link a change ticket in the runs index.\n- Use `--dry-run` + `--summary-json` in CI for a planning stage artifact.\n- Provide `--ttl-days` and/or `--max-keep-runs` for lifecycle & cost controls.\n\n## Requirements\n\n- Python 3.9+\n- AWS credentials with S3 access to the target bucket\n- Allure commandline available on PATH (e.g., via Allure CLI or allure-pytest)\n\n## S3 layout and caching\n\n- Keys:\n - `s3://<bucket>/<prefix>/<project>/<branch>/<run_id>/...`\n - `s3://<bucket>/<prefix>/<project>/<branch>/latest/...`\n - `s3://<bucket>/<prefix>/<project>/<branch>/runs/index.json` (manifest)\n - `s3://<bucket>/<prefix>/<project>/<branch>/runs/index.html` (HTML index)\n - `s3://<bucket>/<prefix>/<project>/<branch>/latest.json` (pointer)\n- Two-phase swap writes a `LATEST_READY` marker file under `latest/` when ready.\n- Cache-Control:\n - `index.html`: `no-cache`\n - files under `widgets/`: `no-cache`\n - everything else: `public, max-age=31536000, immutable`\n\n## CLI usage\n\nInstall locally for development:\n\n```bash\npip install -e .[dev]\n```\n\nRun the publisher after tests generate `allure-results`:\n\n```bash\npublish-allure \\\n --bucket your-bucket \\\n --prefix reports \\\n --project demo \\\n --branch main \\\n --cloudfront https://reports.example.com \\\n --ttl-days 30 \\\n --max-keep-runs 10\n```\n\nFlags (CLI):\n\n- `--bucket` (required): S3 bucket name\n- `--prefix` (default: `reports`): Root prefix\n- `--project` (required): Project name\n- `--branch` (default: `$GIT_BRANCH` or `main`)\n- `--run-id` (default: `$ALLURE_RUN_ID` or `YYYYMMDD-HHMMSS`)\n- `--cloudfront` (optional; default: `$ALLURE_CLOUDFRONT`)\n- `--results` (default: `allure-results`): Input directory\n- `--report` (default: `allure-report`): Output directory\n- `--ttl-days` (optional): Add `ttl-days=<N>` object tag\n- `--max-keep-runs` (optional): Keep N newest run prefixes, delete older\n- `--summary-json <path>`: Write machine-readable summary\n- `--check`: Preflight validation (AWS access, allure, inputs)\n- `--dry-run`: Print planned prefixes and sample headers, no upload\n- `--s3-endpoint`: Custom S3 endpoint (e.g. `http://localhost:4566` for LocalStack)\n\nEnvironment fallbacks:\n\n- `GIT_BRANCH` \u2192 `--branch` default\n- `ALLURE_RUN_ID` \u2192 `--run-id` default\n- `ALLURE_CLOUDFRONT` \u2192 `--cloudfront` default\n- `ALLURE_S3_ENDPOINT` \u2192 `--s3-endpoint` default (LocalStack / custom S3)\n\n## Pytest plugin usage\n\nRun tests and publish during terminal summary:\n\n```bash\npytest \\\n --allure-bucket your-bucket \\\n --allure-prefix reports \\\n --allure-project demo \\\n --allure-branch main \\\n --allure-cloudfront https://reports.example.com \\\n --allure-ttl-days 30 \\\n --allure-max-keep-runs 10\n```\n\nFlags (pytest):\n\n- `--allure-bucket` (required)\n- `--allure-prefix` (default: `reports`)\n- `--allure-project` (required)\n- `--allure-branch` (default: `$GIT_BRANCH` or `main`)\n- `--allure-run-id` (default: `$ALLURE_RUN_ID` or `YYYYMMDD-HHMMSS`)\n- `--allure-cloudfront` (optional; default: `$ALLURE_CLOUDFRONT`)\n- `--allure-ttl-days` (optional)\n- `--allure-max-keep-runs` (optional)\n- `--allure-summary-json <path>` (optional)\n- `--allure-check` / `--allure-dry-run` (optional)\n\n## Preflight and dry-run\n\n- `--check`/`--allure-check` verifies:\n - S3 bucket reachability (HeadBucket/List)\n - `allure-results` exists and is non-empty\n - Allure CLI exists on PATH\n- `--dry-run`/`--allure-dry-run` prints planned prefixes and sample headers; no uploads occur.\n\n## Outputs\n\n- S3 prefixes: run and latest\n- Optional CDN URLs (if `--cloudfront` provided)\n- `runs/index.json` manifest updated with new run entry\n- `runs/index.html` HTML table of recent runs (newest first) with columns: Run ID, Epoch, UTC Time, Size, P/F/B, Run, Latest (newest row highlighted with \u2605)\n- `latest.json` pointer to current run (simple machine-readable metadata)\n- Optional `--summary-json` with sizes, file counts, and destination URLs\n- `latest/LATEST_READY` marker indicates the swap is complete\n\n## Security\n\nSee `SECURITY.md` for how to report vulnerabilities. Never open a public issue containing sensitive details.\n\n## Badges / Status\n\n- CI: multi-version test matrix + lint/security\n- CodeQL: static code analysis\n\n## Contributing\n\nSee `CONTRIBUTING.md` and follow the pre-commit hooks (`pre-commit install`).\n\n## Release\n\nTagged versions (`vX.Y.Z`) are published to PyPI automatically via GitHub OIDC.\n\n## CI examples\n\nGitHub Actions (CLI):\n\n```yaml\njobs:\n tests:\n runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v4\n - uses: actions/setup-python@v5\n with: { python-version: \"3.11\" }\n - run: pip install .[dev]\n - run: pytest -q\n - name: Publish Allure\n env:\n AWS_REGION: us-east-1\n AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n GIT_BRANCH: ${{ github.ref_name }}\n run: >-\n publish-allure --bucket $BUCKET --prefix reports --project demo\n --branch \"$GIT_BRANCH\" --cloudfront https://reports.example.com\n --ttl-days 30 --max-keep-runs 10\n```\n\nPytest-driven (plugin):\n\n```yaml\n- run: pytest -q \\\n --allure-bucket $BUCKET \\\n --allure-prefix reports \\\n --allure-project demo \\\n --allure-branch \"$GIT_BRANCH\" \\\n --allure-cloudfront https://reports.example.com \\\n --allure-ttl-days 30 \\\n --allure-max-keep-runs 10\n```\n\n### Minimal publish-only workflow\n\nCreate `.github/workflows/allure-publish.yml` for a lightweight pipeline that runs tests, generates the report, and publishes it (using secrets for the bucket and AWS credentials):\n\n```yaml\nname: allure-publish\non: [push, pull_request]\njobs:\n publish:\n runs-on: ubuntu-latest\n permissions:\n contents: read\n steps:\n - uses: actions/checkout@v4\n - uses: actions/setup-python@v5\n with:\n python-version: \"3.11\"\n - name: Install deps (minimal)\n run: pip install pytest pytest-allure-host allure-pytest\n - name: Run tests\n run: pytest --alluredir=allure-results -q\n - name: Publish Allure report (dry-run on PRs)\n env:\n AWS_REGION: us-east-1\n AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n ALLURE_BUCKET: ${{ secrets.ALLURE_BUCKET }}\n run: |\n EXTRA=\"\"\n if [ \"${{ github.event_name }}\" = \"pull_request\" ]; then EXTRA=\"--dry-run\"; fi\n publish-allure \\\n --bucket \"$ALLURE_BUCKET\" \\\n --project myproj \\\n --branch \"${{ github.ref_name }}\" \\\n --summary-json summary.json $EXTRA\n - name: Upload publish summary (always)\n if: always()\n uses: actions/upload-artifact@v4\n with:\n name: allure-summary\n path: summary.json\n```\n\nNotes:\n\n- Add `--cloudfront https://reports.example.com` if you have a CDN domain.\n- Add `--context-url ${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.pull_request.number }}` inside PRs to link the run to its PR.\n- Use `--max-keep-runs` / `--ttl-days` to manage storage costs.\n- For LocalStack-based tests, set `--s3-endpoint` and export `ALLURE_S3_ENDPOINT` in `env:`.\n\n## Troubleshooting\n\n- Missing Allure binary: ensure the Allure CLI is installed and on PATH.\n- Access denied: verify AWS credentials and bucket IAM for Put/Get/List/Delete.\n- SPA routing 403/404: configure CloudFront error mapping to `/index.html`.\n\n## Development\n\n- Install with Poetry: `poetry install`\n- Run tests: `poetry run pytest -q`\n- Lint (security quick): `poetry run bandit -r pytest_allure_host`\n- Unified lint helper (mirrors CI):\n ```bash\n scripts/lint.sh # check mode (ruff lint+format check, bandit, pip-audit)\n scripts/lint.sh --fix # apply ruff fixes + format\n scripts/lint.sh pre-commit # also run pre-commit hooks on all files\n ```\n\n## Quick local trial (macOS)\n\nThis section walks you through a minimal end-to-end run locally.\n\n1. Prereqs\n\n- AWS credentials configured (via `AWS_PROFILE` or access keys); set `AWS_REGION`.\n- Allure CLI installed on PATH:\n ```bash\n brew install allure\n ```\n- Python deps installed:\n ```bash\n poetry install\n # or\n pip install -e .[dev]\n ```\n\n2. Generate Allure results\n\n- Create a tiny test (optional example):\n ```bash\n mkdir -p tests\n cat > tests/test_sample.py <<'PY'\n def test_ok():\n assert True\n PY\n ```\n- Run pytest to emit results:\n ```bash\n poetry run pytest --alluredir=allure-results\n ```\n\n3. Preflight and dry-run\n\n```bash\npoetry run publish-allure \\\n --bucket <bucket> \\\n --prefix reports \\\n --project demo \\\n --branch $(git rev-parse --abbrev-ref HEAD) \\\n --cloudfront https://<cloudfront_domain> \\\n --check \\\n --dry-run\n```\n\n4. Publish\n\n```bash\npoetry run publish-allure \\\n --bucket <bucket> \\\n --prefix reports \\\n --project demo \\\n --branch $(git rev-parse --abbrev-ref HEAD) \\\n --cloudfront https://<cloudfront_domain> \\\n --ttl-days 30 \\\n --max-keep-runs 5\n```\n\n5. Verify\n\n- S3: `reports/demo/<branch>/<run_id>/...` and `reports/demo/<branch>/latest/` with `LATEST_READY`.\n- CDN: open printed `run_url` / `latest_url`.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Publish Allure static reports to private S3 behind CloudFront with history preservation",
"version": "2.0.1",
"project_urls": {
"Bug Tracker": "https://github.com/darrenrabbs/allurehosting/issues",
"Changelog": "https://darrenrabbs.github.io/allurehosting/changelog/",
"Documentation": "https://darrenrabbs.github.io/allurehosting/",
"Homepage": "https://github.com/darrenrabbs/allurehosting",
"Repository": "https://github.com/darrenrabbs/allurehosting"
},
"split_keywords": [
"allure",
" pytest",
" aws",
" s3",
" cloudfront",
" reporting"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "25f87376a16538324c71d08be9414135fb50fc592914f4c44fb2fb19c205adfc",
"md5": "ec54188485d2b5133f1390cf964b9f7f",
"sha256": "e34c38b1d6bbb545b81c114e81c4c98f8b00e0ee3d371bc0db1a1d049c519b0a"
},
"downloads": -1,
"filename": "pytest_allure_host-2.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ec54188485d2b5133f1390cf964b9f7f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 48290,
"upload_time": "2025-10-10T23:24:28",
"upload_time_iso_8601": "2025-10-10T23:24:28.468736Z",
"url": "https://files.pythonhosted.org/packages/25/f8/7376a16538324c71d08be9414135fb50fc592914f4c44fb2fb19c205adfc/pytest_allure_host-2.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "988ecbfd7b47e871e3ac5411ab5ad8bbe69f237e698ef6088fb33467b0d87ef6",
"md5": "5b6ecdf604867a1340d70768680cbdab",
"sha256": "e13c2bf6b8390ef0474fed3a667fa2f952d361fe656104609c017ebb9e0d3fbc"
},
"downloads": -1,
"filename": "pytest_allure_host-2.0.1.tar.gz",
"has_sig": false,
"md5_digest": "5b6ecdf604867a1340d70768680cbdab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 48521,
"upload_time": "2025-10-10T23:24:29",
"upload_time_iso_8601": "2025-10-10T23:24:29.726121Z",
"url": "https://files.pythonhosted.org/packages/98/8e/cbfd7b47e871e3ac5411ab5ad8bbe69f237e698ef6088fb33467b0d87ef6/pytest_allure_host-2.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-10 23:24:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "darrenrabbs",
"github_project": "allurehosting",
"github_not_found": true,
"lcname": "pytest-allure-host"
}