2024-09-16 13:51:46 +00:00
|
|
|
name: pull-request-merge-check.yml
|
2023-11-30 09:49:29 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- "develop"
|
2024-06-17 13:51:43 +00:00
|
|
|
types:
|
2024-09-16 13:51:46 +00:00
|
|
|
- opened
|
|
|
|
- reopened
|
|
|
|
- synchronize
|
|
|
|
- ready_for_review
|
|
|
|
|
2024-07-29 14:43:55 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
|
|
cancel-in-progress: true
|
2023-11-30 09:49:29 +00:00
|
|
|
|
2024-09-16 14:17:56 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
checks: write
|
|
|
|
id-token: write
|
|
|
|
pull-requests: write
|
|
|
|
|
2023-11-30 09:49:29 +00:00
|
|
|
jobs:
|
2024-09-16 13:51:46 +00:00
|
|
|
change:
|
2024-06-17 13:51:43 +00:00
|
|
|
if: github.event.pull_request.draft == false
|
2023-11-30 09:49:29 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-09-16 13:51:46 +00:00
|
|
|
outputs:
|
2024-12-19 11:23:13 +00:00
|
|
|
hideout: ${{ steps.filter.outputs.hideout }}
|
2024-09-17 13:07:40 +00:00
|
|
|
owl: ${{ steps.filter.outputs.owl }}
|
2024-09-16 13:51:46 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.PAT }}
|
|
|
|
|
|
|
|
- name: Check Changes
|
2024-09-18 02:57:12 +00:00
|
|
|
uses: dorny/paths-filter@v3
|
2024-09-16 13:51:46 +00:00
|
|
|
id: filter
|
|
|
|
with:
|
|
|
|
filters: |
|
2024-12-19 11:19:22 +00:00
|
|
|
hideout:
|
|
|
|
- 'hideout/**'
|
2024-09-16 13:51:46 +00:00
|
|
|
- 'libs.versions.toml'
|
|
|
|
owl:
|
|
|
|
- 'owl/**'
|
|
|
|
- 'libs.versions.toml'
|
|
|
|
|
2024-12-19 11:19:22 +00:00
|
|
|
hideout-setup:
|
2024-09-16 14:39:12 +00:00
|
|
|
needs:
|
|
|
|
- change
|
2024-12-19 11:19:22 +00:00
|
|
|
if: github.event.pull_request.draft == false && needs.change.outputs.hideout == 'true'
|
2024-09-16 14:39:12 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.PAT }}
|
|
|
|
|
|
|
|
- name: Gradle Wrapper Validation
|
|
|
|
uses: gradle/actions/wrapper-validation@v4
|
|
|
|
|
|
|
|
- name: Set up JDK 21
|
|
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
|
|
|
java-version: '21'
|
|
|
|
distribution: 'temurin'
|
|
|
|
|
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/actions/setup-gradle@v4
|
|
|
|
with:
|
|
|
|
cache-read-only: false
|
|
|
|
gradle-home-cache-cleanup: true
|
|
|
|
- name: Build
|
2024-12-19 11:19:22 +00:00
|
|
|
run: ./gradlew :hideout:test
|
2024-09-17 04:56:24 +00:00
|
|
|
|
2024-12-19 11:19:22 +00:00
|
|
|
- name: JUnit Test Report
|
2024-12-19 11:33:18 +00:00
|
|
|
if: ${{ always() }}
|
2024-12-19 11:19:22 +00:00
|
|
|
uses: mikepenz/action-junit-report@v4
|
2024-09-17 04:56:24 +00:00
|
|
|
with:
|
2024-12-19 11:19:22 +00:00
|
|
|
report_paths: '**/TEST-*.xml'
|
|
|
|
check_name: 'hideout-core JUnit Test Report'
|
2024-09-17 04:56:24 +00:00
|
|
|
|
|
|
|
owl-setup:
|
|
|
|
needs:
|
|
|
|
- change
|
|
|
|
if: github.event.pull_request.draft == false && needs.change.outputs.owl == 'true'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.PAT }}
|
|
|
|
|
|
|
|
- name: Gradle Wrapper Validation
|
|
|
|
uses: gradle/actions/wrapper-validation@v4
|
|
|
|
|
|
|
|
- name: Set up JDK 21
|
|
|
|
uses: actions/setup-java@v4
|
|
|
|
with:
|
|
|
|
java-version: '21'
|
|
|
|
distribution: 'temurin'
|
|
|
|
|
|
|
|
- name: Setup Gradle
|
|
|
|
uses: gradle/actions/setup-gradle@v4
|
|
|
|
with:
|
|
|
|
cache-read-only: false
|
|
|
|
gradle-home-cache-cleanup: true
|
|
|
|
|
|
|
|
- name: Build
|
2024-12-19 11:19:22 +00:00
|
|
|
run: ./gradlew :owl:test
|
2024-09-17 04:56:24 +00:00
|
|
|
|
|
|
|
- name: JUnit Test Report
|
2024-12-19 11:33:18 +00:00
|
|
|
if: ${{ always() }}
|
2024-09-17 04:56:24 +00:00
|
|
|
uses: mikepenz/action-junit-report@v4
|
|
|
|
with:
|
|
|
|
report_paths: '**/TEST-*.xml'
|
|
|
|
check_name: 'owl JUnit Test Report'
|
|
|
|
|
2023-11-30 09:49:29 +00:00
|
|
|
|
2023-11-30 10:35:39 +00:00
|
|
|
lint:
|
2024-12-19 11:34:04 +00:00
|
|
|
if: always() && (needs.change.outputs.hideout == 'true' || needs.change.outputs.owl == 'true')
|
2024-09-16 13:51:46 +00:00
|
|
|
needs:
|
|
|
|
- change
|
2024-12-19 11:22:09 +00:00
|
|
|
- hideout-setup
|
2024-09-17 04:56:24 +00:00
|
|
|
- owl-setup
|
2023-11-30 10:35:39 +00:00
|
|
|
runs-on: ubuntu-latest
|
2024-08-13 11:11:00 +00:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2023-11-30 10:35:39 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2024-05-07 13:23:54 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-08-13 11:11:00 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ github.head_ref }}
|
2024-09-16 13:51:46 +00:00
|
|
|
token: ${{ secrets.PAT }}
|
2023-11-30 10:35:39 +00:00
|
|
|
|
2024-02-04 07:19:33 +00:00
|
|
|
- name: Set up JDK 21
|
2024-05-07 13:26:23 +00:00
|
|
|
uses: actions/setup-java@v4
|
2023-11-30 10:35:39 +00:00
|
|
|
with:
|
2024-02-04 07:19:33 +00:00
|
|
|
java-version: '21'
|
2023-11-30 10:35:39 +00:00
|
|
|
distribution: 'temurin'
|
|
|
|
|
2024-07-29 15:06:09 +00:00
|
|
|
- name: Setup Gradle
|
2024-08-03 23:11:59 +00:00
|
|
|
uses: gradle/actions/setup-gradle@v4
|
2023-11-30 10:35:39 +00:00
|
|
|
with:
|
2024-07-29 15:19:50 +00:00
|
|
|
cache-read-only: false
|
2024-07-29 15:06:09 +00:00
|
|
|
gradle-home-cache-cleanup: true
|
|
|
|
|
2024-09-16 13:51:46 +00:00
|
|
|
- name: Lint
|
2024-12-19 11:19:22 +00:00
|
|
|
run: ./gradlew :hideout:detekt :owl:detektMain
|
2023-11-30 10:35:39 +00:00
|
|
|
|
2024-06-17 13:31:22 +00:00
|
|
|
- name: Auto Commit
|
2023-11-30 10:35:39 +00:00
|
|
|
if: ${{ always() }}
|
2024-06-17 13:31:22 +00:00
|
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
2023-11-30 10:35:39 +00:00
|
|
|
with:
|
2024-06-17 13:31:22 +00:00
|
|
|
commit_message: "style: fix lint (CI)"
|