Skip to content

Commit

Permalink
[CI] Ensure Move Tests are run when Move files change
Browse files Browse the repository at this point in the history
Move tests are run as part of the Rust tests for the Sui Framework,
but they should also be run when there are only Move changes.

Surfaced because a recent PR (#14429) Moved some Move tests causing CI
to fail on `main`, and this wasn't picked up because diff tests hadn't
been run.

Test Plan:

CI
  • Loading branch information
amnn committed Oct 27, 2023
1 parent 23c0280 commit b274274
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/actions/diffs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ outputs:
description: True when changes happened to the Move code
value: "${{ steps.diff.outputs.isMove }}"
isReleaseNotesEligible:
description: True when changes happened in Release Notes eligible paths
value: "${{ steps.diff.outputs.isReleaseNotesEligible }}"
description: True when changes happened in Release Notes eligible paths
value: "${{ steps.diff.outputs.isReleaseNotesEligible }}"

runs:
using: composite
Expand Down Expand Up @@ -42,6 +42,7 @@ runs:
- 'crates/sui-framework-tests/**'
- 'crates/sui_move/**'
- 'Cargo.toml'
- 'examples/**'
- 'sui_programmability/**'
isReleaseNotesEligible:
- 'crates/**'
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,22 @@ jobs:
- name: check new tests for flakiness
run: |
scripts/simtest/stress-new-tests.sh
# This job ensures that Move unit tests are run if there are changes
# to Move code but not Rust code (If there are Rust changes, they
# will be run as part of a larger test suite).
move-test:
needs: diff
if: needs.diff.outputs.isRust == 'false' && needs.diff.outputs.isMove == 'true'
timeout-mins: 10
runs-on: [ubuntu-ghcloud]
steps:
- uses: actions/checkout@v3
- uses: taiki-e/install-action@nextest
- name: Run move tests
run: |
cargo nextest run -p sui-framework-tests -- unit_tests::
# # Disabled
# rosetta-validation:
# needs: diff
Expand Down

0 comments on commit b274274

Please sign in to comment.