build file updated #1
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: Java CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_PASSWORD }} | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Test | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 8.2 | |
arguments: test | |
- name: Analysis of Coverage | |
uses: cicirello/jacoco-badge-generator@v2 | |
with: | |
generate-branches-badge: true | |
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv | |
- name: Analysis Badges Commit | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git config --global user.name 'goafabric' && git config --global user.email '[email protected]' | |
git add -A && git commit -m "Autogenerated JaCoCo coverage badge" && git push | |
fi | |
- name: JVM Image | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 8.2 | |
arguments: vaadinBuildFrontend jib jib | |
- name: Native Image | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 8.2 | |
arguments: dockerImageNative |