Skip to content

tests_coverage_jacoco #10

tests_coverage_jacoco

tests_coverage_jacoco #10

Workflow file for this run

env:
PRE_BUILD_COMMAND: git config --global --add safe.directory /github/workspace
name: tests_coverage_jacoco
on:
schedule:
- cron: "0 0 1 * *" # Once a month
permissions:
contents: write
id-token: write
pages: write
jobs:
deploy:
environment:
name: github-pages
#url: ${{ steps.deployment.outputs.page_url }}
url: https://virtual-imaging-platform.github.io/VIP-portal/
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "temurin"
- name: Build Maven
run: mvn clean install
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: "coverage/target/site/jacoco-aggregate/"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
##### Added #####
- name: Commit and Push to History Branch
run: |
git fetch
git branch -a
git checkout -b coverage_history origin/coverage_history
git config --global user.email "[email protected]"
git config --global user.name "github-ci"
DATE=$(date +%Y-%m-%d-%H-%M-%S)
mkdir -p coverage_history/"$DATE"
cp -R "coverage/target/site/jacoco-aggregate/." coverage_history/"$DATE"/
git add -f coverage_history/"$DATE"
git commit -m "Update Jacoco HTML report"
git push origin