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
31 changes: 31 additions & 0 deletions .github/workflows/pr-differences-mutants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,43 @@ on:
- ready_for_review
paths:
- '**.rs'
workflow_dispatch:
inputs:
ignore_timeout:
description: "Ignore mutants timeout limit"
required: false
type: choice
options:
- true
ASuciuX marked this conversation as resolved.
Show resolved Hide resolved
default: 'true'

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

jobs:
check-right-permissions:
name: Check Right Permissions
runs-on: ubuntu-latest

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

- name: Fail if the user does not have the right permissions
if: ${{ inputs.ignore_timeout == 'true' && steps.check_right_permissions.outputs.is_team_member != 'true' }}
ASuciuX marked this conversation as resolved.
Show resolved Hide resolved
run: exit 1

# 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-right-permissions

runs-on: ubuntu-latest

Expand All @@ -30,10 +57,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: ${{ inputs.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 +250,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 }}