Skip to content

Commit

Permalink
Run mutation tests only for changed files in PRs
Browse files Browse the repository at this point in the history
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Jun 13, 2021
1 parent a96be01 commit feee509
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,18 @@ jobs:
- name: Infection
if: ${{ github.base_ref != '' }}
run: |
./build/tools/infection -j$(nproc) --skip-initial-tests --no-interaction --no-progress --only-covered --coverage=build/logs \
CHANGED_FILES=$(git diff origin/$GITHUB_BASE_REF --diff-filter=AM --name-only | grep libraries/classes/ | paste -sd "," -);
./build/tools/infection -j$(nproc) --skip-initial-tests --no-interaction --no-progress --coverage=build/logs \
--ignore-msi-with-no-mutations \
--git-diff-filter=AM \
--git-diff-base=origin/${{ github.base_ref }}
--filter=$CHANGED_FILES
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}

- name: Infection
if: ${{ github.base_ref == '' }}
run: |
./build/tools/infection -j$(nproc) --skip-initial-tests --no-interaction --no-progress --only-covered --coverage=build/logs
./build/tools/infection -j$(nproc) --skip-initial-tests --no-interaction --no-progress --coverage=build/logs
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}

0 comments on commit feee509

Please sign in to comment.