diff options
author | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-06-13 21:29:14 +0300 |
---|---|---|
committer | Maurício Meneghini Fauth <mauricio@fauth.dev> | 2021-06-13 21:29:14 +0300 |
commit | feee5091bea890bc49b5d82de29b4dd7134dc5a8 (patch) | |
tree | 824ec5867194d026e66eb0798364e3337bafe8bf /.github/workflows | |
parent | a96be01b6d067248a51ed3bdeaafce9ce424b331 (diff) |
Run mutation tests only for changed files in PRs
Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/mutation-tests.yml | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/.github/workflows/mutation-tests.yml b/.github/workflows/mutation-tests.yml index 83869becbf..29e10238ac 100644 --- a/.github/workflows/mutation-tests.yml +++ b/.github/workflows/mutation-tests.yml @@ -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 }} |