diff --git a/.github/module_workflow_template.yml b/.github/module_workflow_template.yml new file mode 100644 index 0000000000..82adf910b5 --- /dev/null +++ b/.github/module_workflow_template.yml @@ -0,0 +1,60 @@ +name: Hartshorn {{{name.capitalized}}} + +on: + pull_request: + paths: + - 'hartshorn-{{{name.lower}}}/**' + +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-{{{name.lower}}}: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-{{{name.lower}}}: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-{{{name.lower}}}:test