Try to find files in current directory #158
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: Gradle Build and Test | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
jobs: | |
gradle: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: temurin | |
# Always build with JDK 8 initially | |
java-version: 8 | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v3 | |
with: | |
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }} | |
- name: Cache Gradle packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.gradle/caches | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
restore-keys: ${{ runner.os }}-gradle | |
- name: Execute Gradle build | |
run: ./gradlew clean check integrationTest --scan --stacktrace | |
- name: 'Publish Test Results' | |
uses: EnricoMi/publish-unit-test-result-action/linux@v2 | |
if: always() | |
with: | |
files: | | |
**/build/test-results/**/*.xml | |
- name: JaCoCo Test Coverage Report | |
uses: PavanMudigonda/[email protected] | |
with: | |
coverage_results_path: "htmlSanityCheck-gradle-plugin/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml" | |
coverage_report_name: Coverage | |
coverage_report_title: JaCoCo | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload (Maven) Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: maven-repo | |
path: build/maven-repo | |
- name: Upload (CLI) Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: CLI | |
path: htmlSanityCheck-cli/build/install | |
- name: Trigger Test Matrix Workflow | |
uses: benc-uk/workflow-dispatch@v1 | |
with: | |
workflow: test-java-os-mix.yml |