From 5ba78ced265bfdec3518058c8880e2f52a3645bd Mon Sep 17 00:00:00 2001 From: ASuciuX Date: Tue, 19 Dec 2023 16:11:27 +0200 Subject: [PATCH] feat: add workflow files --- .github/workflows/filter-pr-mutants.yml | 22 ++++++++++++++++++++ .github/workflows/logger-mutants.yml | 27 +++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .github/workflows/filter-pr-mutants.yml create mode 100644 .github/workflows/logger-mutants.yml diff --git a/.github/workflows/filter-pr-mutants.yml b/.github/workflows/filter-pr-mutants.yml new file mode 100644 index 0000000000..9f3870540c --- /dev/null +++ b/.github/workflows/filter-pr-mutants.yml @@ -0,0 +1,22 @@ +name: Tracking PR Mutants + +on: + pull_request: + types: + - opened + - reopened + - synchronize + - ready_for_review + paths: + - "**.rs" + +jobs: + # Mutants testing: Execute on PR on packages that have functions modified, and fail the workflow if there are missed or timeout mutations + incremental-mutants: + name: Incremental Mutants Testing + + runs-on: ubuntu-latest + + steps: + - name: Run filtering pr mutants from actions + uses: ASuciuX/actions/mutation-testing/filter-pr@test/simulate-pr-and-merged-mutants diff --git a/.github/workflows/logger-mutants.yml b/.github/workflows/logger-mutants.yml new file mode 100644 index 0000000000..8a35fa017e --- /dev/null +++ b/.github/workflows/logger-mutants.yml @@ -0,0 +1,27 @@ +name: Logging Mutants + +# only run on push in order to update the cache output +# flow: +# restore cache +# install cargo-mutants crate in order to run the 'cargo mutants' command +# create a file with the current commit hash if a previous one doesn't exist, then print it +# run the script that handles the 'cargo mutants' command on the differences between the latest updates and the last commit where it was ran +# overwrite the previous commit hash with the current one for the following run +# delete the old cache +# save the new cache with the updated mutants +# upload artifact to easily check it for the given commit + +on: + push: + branches: + - deployer-develop/mutants-pr-big + +jobs: + save_cache: + runs-on: ubuntu-latest + + steps: + - name: Run logging mutants from actions + uses: ASuciuX/actions/mutation-testing/logger@test/simulate-pr-and-merged-mutants + with: + gh-token: ${{ secrets.GITHUB_TOKEN }}