Skip to content

Commit

Permalink
#984 Add template for module workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
GuusLieben committed Sep 17, 2023
1 parent 6630370 commit cbba876
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/module_workflow_template.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cbba876

Please sign in to comment.