Open ai #21
Workflow file for this run
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: | |
# Trigger the workflow on push or pull request, | |
# but only for the main branch | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
java: [ '8', '11', '17'] | |
name: JDK ${{ matrix.Java }} build | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Java | |
uses: actions/[email protected] | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'adopt' | |
cache: gradle | |
- name: Before Script | |
run: curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter && chmod +x ./cc-test-reporter && ./cc-test-reporter before-build | |
- name: Validate Gradle wrapper | |
uses: gradle/[email protected] | |
- name: Build with Gradle headless | |
uses: coactions/[email protected] | |
with: | |
run: ./gradlew clean build jacocoTestReport | |
- name: Cleanup Gradle Cache | |
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions. | |
# Restoring these files from a GitHub Actions cache might cause problems for future builds. | |
run: | | |
rm -f ~/.gradle/caches/modules-2/modules-2.lock | |
rm -f ~/.gradle/caches/modules-2/gc.properties | |
- name: Test & publish code coverage | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: e725fad6a6a0b7580271e8183ad773ff705a3b33c5d3a588b940b4f00fa85e69 | |
JACOCO_SOURCE_PATH: "${{github.workspace}}/src/main/java" | |
with: | |
coverageLocations: ${{github.workspace}}/build/reports/jacoco/test/jacocoTestReport.xml:jacoco |