Skip to content
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

CI Mutants: Action Membership Run #5083

Merged
merged 14 commits into from
Aug 22, 2024
22 changes: 22 additions & 0 deletions .github/workflows/pr-differences-mutants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,34 @@ on:
- ready_for_review
paths:
- '**.rs'
workflow_dispatch:

concurrency:
group: pr-differences-${{ github.head_ref || github.ref || github.run_id }}
# Always cancel duplicate jobs
cancel-in-progress: true

jobs:
check-access-permissions:
name: Check Access Permissions
runs-on: ubuntu-latest

steps:
- name: Check Access Permissions To Trigger This
id: check_access_permissions
uses: stacks-network/actions/team-membership@main
with:
username: ${{ github.actor }}
team: 'blockchain-team'
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

outputs:
ignore_timeout: ${{ steps.check_access_permissions.outputs.is_team_member == 'true' && github.event_name == 'workflow_dispatch' }}

# 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
needs: check-access-permissions

runs-on: ubuntu-latest

Expand All @@ -30,10 +48,13 @@ jobs:
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 }}
run_stacks_signer: ${{ steps.check_packages_and_shards.outputs.run_stacks_signer }}
too_many_mutants: ${{ steps.check_packages_and_shards.outputs.too_many_mutants }}

steps:
- id: check_packages_and_shards
uses: stacks-network/actions/stacks-core/mutation-testing/check-packages-and-shards@main
with:
ignore_timeout: ${{ needs.check-access-permissions.outputs.ignore_timeout }}

# Mutation testing - Execute on PR on small packages that have functions modified (normal run, no shards)
pr-differences-mutants-small-normal:
Expand Down Expand Up @@ -220,3 +241,4 @@ jobs:
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 }}
stacks_signer: ${{ needs.check-big-packages-and-shards.outputs.run_stacks_signer }}
too_many_mutants: ${{ needs.check-big-packages-and-shards.outputs.too_many_mutants }}