Feat/new gradle8 (#17) #24
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Java CI with Gradle | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "master", "develop"] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Build with Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
arguments: build allcoverage | |
# run unit test with code coverage report if action is triggered by push of master branch | |
# since Code Climate only evaluate code coverages of default branch. | |
- name: Unit Tests with publishing code coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ${{github.workspace}}/report/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml | |
flags: unittests # optional | |
name: codecov-umbrella # optional | |
fail_ci_if_error: true # optional (default = false) | |
verbose: true # optional (default = false) | |
- name: action-slack | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: github_worker | |
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took | |
if_mention: failure,cancelled | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required |