-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract test splitting env var into a yaml
- Loading branch information
Showing
3 changed files
with
162 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
type: object | ||
properties: | ||
predefined: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
desc: | ||
type: array | ||
items: | ||
type: string | ||
required: | ||
- name | ||
- desc | ||
mandatory: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
desc: | ||
type: array | ||
items: | ||
type: string | ||
required: | ||
- name | ||
- desc | ||
optional: | ||
type: array | ||
items: | ||
type: object | ||
properties: | ||
name: | ||
type: string | ||
desc: | ||
type: array | ||
items: | ||
type: string | ||
default: | ||
type: | ||
- string | ||
- integer | ||
- boolean | ||
required: | ||
- name | ||
- desc | ||
required: | ||
- predefined | ||
- mandatory | ||
- optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
predefined: | ||
- name: BUILDKITE_BUILD_ID | ||
desc: | ||
- The UUID of the pipeline build. Test Splitter uses this UUID along with `BUILDKITE_STEP_ID` to uniquely identify the test plan. | ||
- name: BUILDKITE_JOB_ID | ||
desc: | ||
- The UUID of the job in the pipeline's build. | ||
- name: BUILDKITE_ORGANIZATION_SLUG | ||
desc: | ||
- The slug of your Buildkite organization. | ||
- name: BUILDKITE_PARALLEL_JOB | ||
desc: | ||
- The index number of a parallel job created from a parallel build step. | ||
- Ensure you configure `parallelism` in your pipeline definition. Learn more about parallel build steps in [Concurrency and parallelism](https://buildkite.com/docs/pipelines/controlling-concurrency#concurrency-and-parallelism). | ||
- name: BUILDKITE_PARALLEL_JOB_COUNT | ||
desc: | ||
- The total number of parallel jobs created from a parallel build step. | ||
- Ensure you configure `parallelism` in your pipeline definition. Learn more about parallel build steps in [Concurrency and parallelism](https://buildkite.com/docs/pipelines/controlling-concurrency#concurrency-and-parallelism). | ||
- name: BUILDKITE_STEP_ID | ||
desc: | ||
- The UUID of the step group in the pipeline build. Test Splitter uses this UUID along with `BUILDKITE_BUILD_ID` to uniquely identify the test plan. | ||
|
||
mandatory: | ||
- name: BUILDKITE_SPLITTER_API_ACCESS_TOKEN | ||
desc: | ||
- Buildkite API access token with `read_suites`, `read_test_plan`, and `write_test_plan` scopes. You can create an [API access token](https://buildkite.com/user/api-access-tokens) from **Personal Settings** > **API Access Tokens** in the Buildkite interface. | ||
- name: BUILDKITE_SPLITTER_SUITE_SLUG | ||
desc: | ||
- The slug of your Buildkite Test Analytics test suite. You can find the suite slug in the url for your test suite. | ||
- "For example, the slug for the url: `https://buildkite.com/organizations/my-organization/analytics/suites/my-suite` is `my-suite`." | ||
|
||
optional: | ||
- name: BUILDKITE_SPLITTER_DEBUG_ENABLED | ||
default: false | ||
desc: | ||
- A flag to enable more verbose logging. | ||
- name: BUILDKITE_SPLITTER_RETRY_COUNT | ||
default: 0 | ||
desc: | ||
- The number of retries permitted. Test Splitter runs the test command defined in `BUILDKITE_SPLITTER_TEST_CMD`, and retries only the failing tests for a maximum of `BUILDKITE_SPLITTER_RETRY_COUNT` times. For RSpec, the Test Splitter runs `BUILDKITE_SPLITTER_TEST_CMD` with `--only-failures` as the retry command. | ||
- name: BUILDKITE_SPLITTER_SPLIT_BY_EXAMPLE | ||
default: false | ||
desc: | ||
- A flag to enable split by example. When this option is `true`, the Test Splitter will split the execution of slow test files over multiple partitions. | ||
- name: BUILDKITE_SPLITTER_TEST_CMD | ||
default: bundle exec rspec {{testExamples}} | ||
desc: | ||
- The test command to run your tests. The Test Splitter will replace and populate the `{{testExamples}}` placeholder with the test plan. | ||
- name: BUILDKITE_SPLITTER_TEST_FILE_EXCLUDE_PATTERN | ||
desc: | ||
- The glob pattern to exclude certain test files or directories. The exclusion will be applied after discovering the test files using a pattern configured with `BUILDKITE_SPLITTER_TEST_FILE_PATTERN`. | ||
- _This option accepts the pattern syntax supported by the [zzglob](https://github.com/DrJosh9000/zzglob?tab=readme-ov-file#pattern-syntax) library._ | ||
- name: BUILDKITE_SPLITTER_TEST_FILE_PATTERN | ||
default: spec/**/*_spec.rb | ||
desc: | ||
- The glob pattern to discover test files. You can exclude certain test files or directories from the discovered test files using a pattern that can be configured with `BUILDKITE_SPLITTER_TEST_FILE_EXCLUDE_PATTERN`. | ||
- _This option accepts the pattern syntax supported by the [zzglob](https://github.com/DrJosh9000/zzglob?tab=readme-ov-file#pattern-syntax) library._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters