From 158343d6891b86ac2126b49f0eba12cfe09f239e Mon Sep 17 00:00:00 2001 From: "diffblue-cover[bot]" <141632862+diffblue-cover[bot]@users.noreply.github.com> Date: Thu, 17 Aug 2023 16:12:22 +0000 Subject: [PATCH] Configuring Diffblue Cover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added a GitHub Actions workflow `.github/workflows/DiffblueCover.yml` invoking Diffblue Cover on each pull request. Invoking Diffblue Cover requires a license key, please contact sales@diffblue.com to acquire one. This default workflow configuration should be sufficient for single module Maven projects, but will need further customization for more complex projects. ## Next steps - [ ] Ensure that DIFFBLUE_LICENSE_KEY secret is configured in your project. - If this wasn't configured when opening the Pull Request then the Job will have failed, but can be re-run once you've configured the above secret. - [ ] Ensure that the project is built before Diffblue Cover is invoked. - [ ] Enjoy some AI generated unit tests! See [Customizing GitHub Actions](https://docs.diffblue.com/customizing-github-actions) for ideas on further customization. --- .github/workflows/DiffblueCover.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/DiffblueCover.yml diff --git a/.github/workflows/DiffblueCover.yml b/.github/workflows/DiffblueCover.yml new file mode 100644 index 0000000..cb55c57 --- /dev/null +++ b/.github/workflows/DiffblueCover.yml @@ -0,0 +1,29 @@ +name: Diffblue Cover + +on: + pull_request: + +jobs: + Diffblue: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Java + uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'zulu' + + - name: Maven Install + run: mvn --batch-mode install + + - name: Diffblue Cover + uses: diffblue/cover-github-action@main + with: + license-key: ${{ secrets.DIFFBLUE_LICENSE_KEY }} + + - name: Create Tests + run: dcover create