-
Notifications
You must be signed in to change notification settings - Fork 13
Move CI from GitHub Actions to Buildkite #116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| agents: | ||
| queue: hosted | ||
|
|
||
| steps: | ||
| - label: ":pytest: pytest {{matrix}}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When this Buildkite pipeline is configured to build third-party fork PRs, it starts directly with command steps and never adds the block gate described for fork-triggered builds; Buildkite's block-step docs state that a block step pauses execution until a team member unblocks it (https://buildkite.com/docs/pipelines/configure/step-types/block-step). As written, forked PR code reaches Useful? React with 👍 / 👎.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The block step is in the pipeline's server-side YAML steps, managed by infra-as-code, where it's safer from change. |
||
| command: ".buildkite/steps/test" | ||
| env: | ||
| PYTHON_VERSION: "{{matrix}}" | ||
| matrix: | ||
| - "3.9" | ||
| - "3.10" | ||
| - "3.11" | ||
| - "3.12" | ||
| - "3.13" | ||
|
|
||
| - label: ":pytest: pytest 3.13 / pytest>=9" | ||
| command: ".buildkite/steps/test" | ||
| env: | ||
| PYTHON_VERSION: "3.13" | ||
| UV_RUN_FLAGS: "--with pytest>=9" | ||
|
|
||
| - label: ":python: pylint {{matrix}}" | ||
| command: ".buildkite/steps/lint" | ||
| env: | ||
| PYTHON_VERSION: "{{matrix}}" | ||
| matrix: | ||
| - "3.9" | ||
| - "3.10" | ||
| - "3.11" | ||
| - "3.12" | ||
| - "3.13" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -o errexit | ||
| set -o pipefail | ||
| set -o nounset | ||
|
|
||
| __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| __root="$(cd "$(dirname "${__dir}")"/../ && pwd)" | ||
|
|
||
| cd "$__root" | ||
|
|
||
| # Install uv | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| source "$HOME/.local/bin/env" | ||
|
|
||
| # Install dependencies | ||
| uv python install "$PYTHON_VERSION" | ||
| uv sync --all-extras | ||
|
|
||
| # Run pylint | ||
| uv run pylint src/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -o errexit | ||
| set -o pipefail | ||
| set -o nounset | ||
|
|
||
| __dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
| __root="$(cd "$(dirname "${__dir}")"/../ && pwd)" | ||
|
|
||
| cd "$__root" | ||
|
|
||
| # Dogfood the collector: upload this repo's own test results to Test Engine. | ||
| # Uses an ephemeral OIDC token instead of a long-lived suite token, so this | ||
| # pipeline carries no secrets. | ||
| # https://buildkite.com/docs/pipelines/configure/tests/test-collection/oidc | ||
| SUITE_URL="https://buildkite.com/organizations/buildkite/analytics/suites/test-collector-python" | ||
| BUILDKITE_ANALYTICS_TOKEN="$(buildkite-agent oidc request-token --audience "$SUITE_URL" --lifetime 900)" | ||
| export BUILDKITE_ANALYTICS_TOKEN | ||
|
|
||
| # Install uv | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| source "$HOME/.local/bin/env" | ||
|
|
||
| # Install dependencies | ||
| uv python install "$PYTHON_VERSION" | ||
| uv sync --all-extras | ||
|
|
||
| # Run tests (UV_RUN_FLAGS is intentionally word-split, e.g. "--with pytest>=9") | ||
| # shellcheck disable=SC2086 | ||
| uv run ${UV_RUN_FLAGS:-} pytest |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question: The PR description mentions a block step for fork-triggered builds, but I don’t see that gate before the runnable steps in this checked-in pipeline (and the test step mints the OIDC token). Is the block configured outside the repo, or should it be represented here so fork PRs can’t reach the token step before approval?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's in the static build step that uploads this YAML
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the server-side steps: