-
Notifications
You must be signed in to change notification settings - Fork 751
Mutation testing - pr differences #4178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ASuciuX
merged 26 commits into
stacks-network:develop
from
ASuciuX:test/mutants-filter-pr
Jan 26, 2024
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
8370213
feat: mutation testing initial integration
BowTiedDeployer 06d68b2
Merge branch 'develop' into test/cargo-mutants-testing
ASuciuX 1c5a75c
fix: made functions discoverable to be mutants
BowTiedDeployer 19f56ea
feat: added mutants output before fix clarity package
BowTiedDeployer a3caebb
feat: added mutants output after fix clarity package
BowTiedDeployer e41e89a
Update mutants-testing-general.sh
ASuciuX b1649a3
feat: renamed mod to lib.rs
BowTiedDeployer 32aa967
Delete Dockerfile.mutation-testing as it is also run locally with cargo
ASuciuX 92b4e23
feat: modular mutations on shell
BowTiedDeployer 5387f44
feat: restructure mutants to new CI workflows
BowTiedDeployer 0bf76dd
feat: update link to stacks action repo
BowTiedDeployer 9616e07
Merge branch 'develop' into test/cargo-mutants-testing
ASuciuX 7c91912
feat: keep only filter pr workflow file
BowTiedDeployer 491557d
added specific triggers for the CI action on PR
BowTiedDeployer ff3124e
modularize mutants' runs for different package size cases
BowTiedDeployer b90dc06
feat: rename from `filter-pr` to `pr-differences`
BowTiedDeployer 13f7197
feat: shorter names for steps
BowTiedDeployer 921a01d
feat: check if `tac`, `awk` and `sed` commands exist on host
BowTiedDeployer c6927a7
feat: check files before accessing them
BowTiedDeployer 298e8e0
feat: move shell runs from main workflow to composite action
BowTiedDeployer 12388b7
feat: add documentation for mutation testing
BowTiedDeployer 5a4f9b3
feat: mutation testing - update composite branch
BowTiedDeployer 16b7bff
feat: renamed back the lib files as cargo-mutants supports them now
BowTiedDeployer 9b54fcb
Merge branch 'develop' into test/mutants-filter-pr
wileyj 0875d10
feat: mutants docs - time related outcomes
BowTiedDeployer c16d87c
feat: update mutants doc format & some extra context
BowTiedDeployer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.