diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc487a6b..22782102 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,3 +36,30 @@ jobs: uv run ruff format --check scripts src tests - name: Check official Harbor CLI run: uv run harbor run --help + + package: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v6 + with: + python-version: "3.12" + enable-cache: true + - name: Build sdist and wheel + run: uv build + - name: Check the wheel in a clean environment + run: | + uv venv --python 3.12 "$RUNNER_TEMP/check" + uv pip install --python "$RUNNER_TEMP/check/bin/python" dist/*.whl + "$RUNNER_TEMP/check/bin/websitebench" --version + test "$("$RUNNER_TEMP/check/bin/websitebench" list | wc -l)" -eq 70 + "$RUNNER_TEMP/check/bin/harbor" --version + - name: Check the sdist contents + run: | + tar -tzf dist/websitebench-*.tar.gz > "$RUNNER_TEMP/sdist.txt" + grep -q 'src/websitebench/websitebench-v1.json$' "$RUNNER_TEMP/sdist.txt" + if grep -q '/tasks/' "$RUNNER_TEMP/sdist.txt"; then + echo "::error::the sdist contains task files" + exit 1 + fi diff --git a/docs/development.md b/docs/development.md index 898bc24e..143d0a48 100644 --- a/docs/development.md +++ b/docs/development.md @@ -43,7 +43,7 @@ uv run ruff format scripts src tests ## CI -[CI](../.github/workflows/ci.yml) runs on Python 3.12 and 3.13. It installs locked dependencies, checks source task definitions, runs the unit tests and Ruff checks, and verifies the official Harbor command's help output. +[CI](../.github/workflows/ci.yml) runs on Python 3.12 and 3.13. It installs locked dependencies, checks source task definitions, runs the unit tests and Ruff checks, and verifies the official Harbor command's help output. A separate job builds the sdist and wheel, installs the wheel in a clean environment and runs `websitebench`. ## Package release