[TG-21007] Test Prerelease Build #37
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Test" | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- 'releases/*' | |
# Avoid running the same workflow on the same branch concurrently | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
Test: | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repository with permission to push | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# The default GITHUB_TOKEN doesn't have the necessary permissions | |
# so a custom token should be used here with sufficient access. | |
# | |
# Must have access to the project with at least Write role, and scopes | |
# including code, commit-statuses, pull-requests, workflows and actions. | |
# | |
token: ${{ secrets.DIFFBLUE_TOKEN }} | |
- name: Debug | |
# if: ${{ github.event_name == 'production' }} | |
run: | | |
echo ${{ github.event_name }} | |
echo ${{ github.ref }} | |
git log | |
# Diffblue Cover requires the project to be built so that | |
# the class files can be analysed and tests created. | |
# This job configures Java so that the project can be built. | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'zulu' | |
# This job runs a Maven command to build the project. | |
- name: Maven Install | |
working-directory: ./test | |
run: mvn --batch-mode install | |
# # This job runs a Gradle command to build the project. | |
# - name: Gradle Build | |
# working-directory: ./test | |
# run: ./gradlew --console plain build | |
# Run Diffblue Cover | |
- name: Diffblue Cover | |
uses: ./ # the latest version from the current repository | |
env: | |
JVM_ARGS: -Xmx4096m | |
GITHUB_PR_NUMBER: ${{ github.event.number }} | |
with: | |
# The access token used to push commits and call GitHub APIs. | |
# | |
# Must have access to the project with at least Write role, and scopes | |
# including code, commit-statuses, pull-requests, workflows and actions. | |
access-token: ${{ secrets.DIFFBLUE_TOKEN }} | |
# License key used to activate the installation | |
license-key: ${{ secrets.DIFFBLUE_LICENSE_KEY }} | |
# Integration test project lives in a subdir | |
working-directory: ./test | |
# Collect Diffblue Cover log files | |
- name: Diffblue Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: logs | |
path: | | |
**/.diffblue/** |