diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..2997052 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,30 @@ +--- +name: Check + +on: + workflow_call: + inputs: + projectDir: + description: "project to be checked (path to project directory)" + type: string + required: false + default: '.' + +jobs: + gradle-check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Set up Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Check with Gradle + run: ./gradlew -p ${{ inputs.projectDir }} clean check diff --git a/.github/workflows/java-example-check.yml b/.github/workflows/java-example-check.yml new file mode 100644 index 0000000..e367e3e --- /dev/null +++ b/.github/workflows/java-example-check.yml @@ -0,0 +1,13 @@ +--- +name: Java Example check + +on: + pull_request: + paths: + - 'examples/java/**' + +jobs: + call-check: + uses: ./.github/workflows/check.yml + with: + projectDir: 'examples/java' diff --git a/.github/workflows/kotlin-example-check.yml b/.github/workflows/kotlin-example-check.yml new file mode 100644 index 0000000..d57d42e --- /dev/null +++ b/.github/workflows/kotlin-example-check.yml @@ -0,0 +1,13 @@ +--- +name: Kotlin Example check + +on: + pull_request: + paths: + - 'examples/kotlin/**' + +jobs: + call-check: + uses: ./.github/workflows/check.yml + with: + projectDir: 'examples/kotlin' diff --git a/.github/workflows/loxone-client-check.yml b/.github/workflows/loxone-client-check.yml new file mode 100644 index 0000000..db5326d --- /dev/null +++ b/.github/workflows/loxone-client-check.yml @@ -0,0 +1,12 @@ +--- +name: Loxone Client Kotlin check + +on: + pull_request: + paths: + - '.*gradle.*' + - 'src/**' + +jobs: + call-check: + uses: ./.github/workflows/check.yml