mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 15:55:49 +00:00
Create cover-baseline.yml
Writes all tests
This commit is contained in:
parent
923e2b7aa3
commit
14dbc73a4e
1 changed files with 45 additions and 0 deletions
45
.github/workflows/cover-baseline.yml
vendored
Normal file
45
.github/workflows/cover-baseline.yml
vendored
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
name: Diffblue write all unit tests
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
# Trigger the workflow automatically on pushes to master
|
||||||
|
push:
|
||||||
|
branches: [master]
|
||||||
|
concurrency:
|
||||||
|
# Only allow one run of the workflow per branch to run at a time
|
||||||
|
group: $
|
||||||
|
cancel-in-progress: true
|
||||||
|
jobs:
|
||||||
|
Test:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
env:
|
||||||
|
JVM_ARGS: -Xmx8192m
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Compile project
|
||||||
|
run: mvn --batch-mode --no-transfer-progress clean compile
|
||||||
|
- name: Download Diffblue Cover
|
||||||
|
run: |
|
||||||
|
mkdir -p "$RUNNER_TEMP/dcover"
|
||||||
|
cd "$RUNNER_TEMP/dcover"
|
||||||
|
curl --silent --show-error --location --output "diffblue-cover-cli.zip" "${{ secrets.DIFFBLUE_COVER_URL }}"
|
||||||
|
unzip -q "diffblue-cover-cli.zip"
|
||||||
|
rm -f "diffblue-cover-cli.zip"
|
||||||
|
echo "$RUNNER_TEMP/dcover" >> "$GITHUB_PATH"
|
||||||
|
- name: Create unit tests on each module
|
||||||
|
run: dcover create --batch --coverage-reports
|
||||||
|
- name: Setup Git Credentials
|
||||||
|
uses: fregante/setup-git-user@v2
|
||||||
|
- name: Stage, commit and push unit tests
|
||||||
|
run: |
|
||||||
|
if [ -n "$(git status --short **/*DiffblueTest.java)" ]; then
|
||||||
|
git add **/*DiffblueTest.java
|
||||||
|
git commit --message "Update Unit Tests for $GITHUB_SHA"
|
||||||
|
git push --set-upstream origin
|
||||||
|
else
|
||||||
|
echo "Nothing to commit"
|
||||||
|
fi
|
||||||
|
# - name: Upload Cover Reports
|
||||||
|
# run: dcover upload https://ab9f-86-5-222-185.ngrok-free.app --project "CoreBanking" --name "$GITHUB_SHA"
|
Loading…
Reference in a new issue