-
Notifications
You must be signed in to change notification settings - Fork 674
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4539 from stacks-network/fix/remove-needless-asserts
Fix/remove needless asserts
- Loading branch information
Showing
24 changed files
with
443 additions
and
239 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
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
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
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,139 @@ | ||
name: PR Differences Mutants | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
paths: | ||
- "**.rs" | ||
|
||
concurrency: | ||
group: pr-differences-${{ github.head_ref || github.ref || github.run_id }} | ||
# Always cancel duplicate jobs | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# Check and output whether to run big (`stacks-node`/`stackslib`) or small (others) packages with or without shards | ||
check-big-packages-and-shards: | ||
name: Check Packages and Shards | ||
|
||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
run_big_packages: ${{ steps.check_packages_and_shards.outputs.run_big_packages }} | ||
big_packages_with_shards: ${{ steps.check_packages_and_shards.outputs.big_packages_with_shards }} | ||
run_small_packages: ${{ steps.check_packages_and_shards.outputs.run_small_packages }} | ||
small_packages_with_shards: ${{ steps.check_packages_and_shards.outputs.small_packages_with_shards }} | ||
|
||
steps: | ||
- id: check_packages_and_shards | ||
uses: stacks-network/actions/stacks-core/mutation-testing/check-packages-and-shards@main | ||
|
||
# Mutation testing - Execute on PR on small packages that have functions modified (normal run, no shards) | ||
pr-differences-mutants-small-normal: | ||
name: Mutation Testing - Normal, Small | ||
|
||
needs: check-big-packages-and-shards | ||
|
||
if: ${{ needs.check-big-packages-and-shards.outputs.run_small_packages == 'true' && needs.check-big-packages-and-shards.outputs.small_packages_with_shards == 'false' }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Run mutants on diffs | ||
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main | ||
with: | ||
package-dimension: "small" | ||
|
||
# Mutation testing - Execute on PR on small packages that have functions modified (run with strategy matrix shards) | ||
pr-differences-mutants-small-shards: | ||
name: Mutation Testing - Shards, Small | ||
|
||
needs: check-big-packages-and-shards | ||
|
||
if: ${{ needs.check-big-packages-and-shards.outputs.run_small_packages == 'true' && needs.check-big-packages-and-shards.outputs.small_packages_with_shards == 'true' }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
shard: [0, 1, 2, 3] | ||
|
||
steps: | ||
- name: Run mutants on diffs | ||
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main | ||
with: | ||
shard: ${{ matrix.shard }} | ||
package-dimension: "small" | ||
|
||
# Mutation testing - Execute on PR on big packages that have functions modified (normal run, no shards) | ||
pr-differences-mutants-big-normal: | ||
name: Mutation Testing - Normal, Big | ||
|
||
needs: check-big-packages-and-shards | ||
|
||
if: ${{ needs.check-big-packages-and-shards.outputs.run_big_packages == 'true' && needs.check-big-packages-and-shards.outputs.big_packages_with_shards == 'false' }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Run Run mutants on diffs | ||
env: | ||
BITCOIND_TEST: 1 | ||
RUST_BACKTRACE: full | ||
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main | ||
with: | ||
package-dimension: "big" | ||
|
||
# Mutation testing - Execute on PR on big packages that have functions modified (run with strategy matrix shards) | ||
pr-differences-mutants-big-shards: | ||
name: Mutation Testing - Shards, Big | ||
|
||
needs: check-big-packages-and-shards | ||
|
||
if: ${{ needs.check-big-packages-and-shards.outputs.run_big_packages == 'true' && needs.check-big-packages-and-shards.outputs.big_packages_with_shards == 'true' }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
shard: [0, 1, 2, 3, 4, 5, 6, 7] | ||
|
||
steps: | ||
- name: Run mutants on diffs | ||
env: | ||
BITCOIND_TEST: 1 | ||
RUST_BACKTRACE: full | ||
uses: stacks-network/actions/stacks-core/mutation-testing/pr-differences@main | ||
with: | ||
shard: ${{ matrix.shard }} | ||
package-dimension: "big" | ||
|
||
# Output the mutants and fail the workflow if there are missed/timeout/unviable mutants | ||
output-mutants: | ||
name: Output Mutants | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
[ | ||
check-big-packages-and-shards, | ||
pr-differences-mutants-small-normal, | ||
pr-differences-mutants-small-shards, | ||
pr-differences-mutants-big-normal, | ||
pr-differences-mutants-big-shards, | ||
] | ||
|
||
steps: | ||
- name: Output Mutants | ||
uses: stacks-network/actions/stacks-core/mutation-testing/output-pr-mutants@main | ||
with: | ||
big_packages: ${{ needs.check-big-packages-and-shards.outputs.run_big_packages }} | ||
shards_for_big_packages: ${{ needs.check-big-packages-and-shards.outputs.big_packages_with_shards }} | ||
small_packages: ${{ needs.check-big-packages-and-shards.outputs.run_small_packages }} | ||
shards_for_small_packages: ${{ needs.check-big-packages-and-shards.outputs.small_packages_with_shards }} |
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
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.