-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI/CD] Add simple target determination for framework upgrade test.
- Loading branch information
Showing
3 changed files
with
88 additions
and
3 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
.github/actions/framework-upgrade-determinator/action.yaml
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,41 @@ | ||
name: Framework Upgrade Test Determinator | ||
description: Runs the framework upgrade test determinator | ||
inputs: | ||
GIT_CREDENTIALS: | ||
description: "Optional credentials to pass to git. Useful if you need to pull private repos for dependencies" | ||
required: false | ||
outputs: | ||
run_framework_upgrade_test: | ||
description: "Returns true if the framework upgrade test should be run" | ||
value: ${{ steps.framework_upgrade_determinator.outputs.run_framework_upgrade_test }} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
# Checkout the repository and setup the rust toolchain | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 # Fetch all git history for accurate target determination | ||
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main | ||
with: | ||
GIT_CREDENTIALS: ${{ inputs.GIT_CREDENTIALS }} | ||
|
||
# Output the changed files | ||
- name: Output the changed files | ||
run: cargo x changed-files -vv | ||
shell: bash | ||
|
||
# Output the affected packages | ||
- name: Output the affected packages | ||
run: cargo x affected-packages -vv | ||
shell: bash | ||
|
||
# Run the framework upgrade test determinator | ||
- name: Run the framework upgrade test determinator | ||
id: framework_upgrade_determinator | ||
run: | | ||
export RESULT=$(cargo x targeted-framework-upgrade-tests | awk -F'Framework upgrade test required: ' '{print $2}') | ||
echo "Framework upgrade test required: $RESULT" | ||
echo "run_framework_upgrade_test=$RESULT" >> $GITHUB_OUTPUT | ||
shell: bash |
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
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