Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions buildkite/test-template-fastcheck.j2
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ steps:
- exit_status: -10 # Agent was lost
limit: 5

- label: ":pre-commit: Pre-commit checks"
key: pre-commit-checks
cancel_on_build_failing: true
agents:
queue: cpu_queue_premerge
command: |
pip install pre-commit
export PATH="$HOME/.local/bin:$PATH"
if ! pre-commit run --all-files --hook-stage manual; then
echo "Pre-commit checks failed. Canceling the build."
curl -H "Authorization: Bearer $BUILDKITE_AGENT_ACCESS_TOKEN" \
-X PUT "https://api.buildkite.com/v2/organizations/$BUILDKITE_ORGANIZATION_SLUG/pipelines/$BUILDKITE_PIPELINE_SLUG/builds/$BUILDKITE_BUILD_NUMBER/cancel"
exit 1
fi

- block: Run Neuron Test
depends_on: ~
key: run-neuron-test
Expand Down