#984 Set up builds and tests to run per changed module #4
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: Hartshorn Core | |
on: | |
pull_request: | |
paths: | |
- 'hartshorn-core/**' | |
jobs: | |
build: | |
name: Build (JDK 17) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build | |
run: ./gradlew hartshorn-core:build -x test -x copyArtifacts | |
compatBuild: | |
needs: [ build ] | |
name: Compatibility Build (JDK 17, ${{ matrix.os }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-latest, macos-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build | |
run: ./gradlew hartshorn-core:build -x test -x copyArtifacts | |
test: | |
needs: [ build ] | |
name: Unit tests (JDK ${{ matrix.java }}) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
java: [ 17, 18, 19 ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up source JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Test | |
run: ./gradlew hartshorn-core:test |