-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into certified_data_prop_test
- Loading branch information
Showing
14 changed files
with
9,668 additions
and
43,972 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,23 @@ | ||
## Example Usage | ||
|
||
```yaml | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- id: determine-exclusions | ||
uses: ./.github/actions/determine_exclusions | ||
with: | ||
is_workflow_dispatch: ${{ github.event_name == 'workflow_dispatch' }} | ||
exclude_slow_input: ${{ inputs.exclude-slow-tests }} | ||
exclude_unstable_input: ${{ inputs.exclude-unstable-tests }} | ||
exclude_release_only_input: ${{ inputs.exclude-release-only-tests }} | ||
is_feature_branch_draft_pr: ${{ steps.set-conditions.outputs.is_feature_branch_draft_pr }} | ||
is_feature_branch_pr: ${{ steps.set-conditions.outputs.is_feature_branch_pr }} | ||
is_main_branch_push: ${{ steps.set-conditions.outputs.is_main_branch_push }} | ||
|
||
- name: Use exclusion outputs | ||
run: | | ||
echo "Exclude slow tests: ${{ steps.determine-exclusions.outputs.exclude_slow }}" | ||
echo "Exclude unstable tests: ${{ steps.determine-exclusions.outputs.exclude_unstable }}" | ||
echo "Exclude release only tests: ${{ steps.determine-exclusions.outputs.exclude_release_only }}" | ||
``` |
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,56 @@ | ||
name: 'Determine Test Exclusions' | ||
description: 'Determines which tests should be excluded based on workflow trigger and conditions' | ||
|
||
inputs: | ||
is_workflow_dispatch: | ||
description: 'Whether this is a workflow dispatch run' | ||
required: true | ||
exclude_slow_input: | ||
description: 'Workflow dispatch input for excluding slow tests' | ||
required: true | ||
exclude_unstable_input: | ||
description: 'Workflow dispatch input for excluding unstable tests' | ||
required: true | ||
exclude_release_only_input: | ||
description: 'Workflow dispatch input for excluding release only tests' | ||
required: true | ||
is_feature_branch_draft_pr: | ||
description: 'Whether this is a draft PR' | ||
required: true | ||
is_feature_branch_pr: | ||
description: 'Whether this is a feature branch PR' | ||
required: true | ||
is_main_branch_push: | ||
description: 'Whether this is a push to main' | ||
required: true | ||
|
||
outputs: | ||
exclude_slow: | ||
description: 'Whether to exclude slow tests' | ||
value: ${{ steps.determine.outputs.exclude_slow }} | ||
exclude_unstable: | ||
description: 'Whether to exclude unstable tests' | ||
value: ${{ steps.determine.outputs.exclude_unstable }} | ||
exclude_release_only: | ||
description: 'Whether to exclude release only tests' | ||
value: ${{ steps.determine.outputs.exclude_release_only }} | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- id: determine | ||
shell: bash | ||
run: | | ||
if [[ "${{ inputs.is_workflow_dispatch }}" == "true" ]]; then | ||
echo "exclude_slow=${{ inputs.exclude_slow_input }}" >> $GITHUB_OUTPUT | ||
echo "exclude_unstable=${{ inputs.exclude_unstable_input }}" >> $GITHUB_OUTPUT | ||
echo "exclude_release_only=${{ inputs.exclude_release_only_input }}" >> $GITHUB_OUTPUT | ||
else | ||
exclude_slow=${{ inputs.is_feature_branch_draft_pr }} | ||
exclude_unstable=${{ inputs.is_feature_branch_draft_pr == 'true' || inputs.is_feature_branch_pr == 'true' }} | ||
exclude_release_only=${{ inputs.is_feature_branch_draft_pr == 'true' || inputs.is_feature_branch_pr == 'true' || inputs.is_main_branch_push == 'true' }} | ||
echo "exclude_slow=$exclude_slow" >> $GITHUB_OUTPUT | ||
echo "exclude_unstable=$exclude_unstable" >> $GITHUB_OUTPUT | ||
echo "exclude_release_only=$exclude_release_only" >> $GITHUB_OUTPUT | ||
fi |
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
Oops, something went wrong.