mirror of
https://github.com/usbharu/Hideout.git
synced 2026-07-03 04:07:53 +00:00
chore: owlとactivitypubにもlintとコードカバレッジの計測を追加
This commit is contained in:
@@ -26,6 +26,8 @@ jobs:
|
||||
outputs:
|
||||
core: ${{ steps.filter.outputs.core }}
|
||||
mastodon: ${{ steps.filter.outputs.mastodon }}
|
||||
activitypub: ${{ steps.filter.outputs.ap }}
|
||||
owl: $${{ steps.filter.outputs.owl }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
@@ -108,6 +110,64 @@ jobs:
|
||||
- name: Build
|
||||
run: ./gradlew :hideout-mastodon:classes --no-daemon
|
||||
|
||||
hideout-activitypub-setup:
|
||||
needs:
|
||||
- change
|
||||
if: github.event.pull_request.draft == false && needs.change.outputs.activitypub == '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
|
||||
run: ./gradlew :hideout-activitypub:classes --no-daemon
|
||||
|
||||
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
|
||||
run: ./owl/gradlew :owl:classes --no-daemon
|
||||
|
||||
hideout-core-unit-test:
|
||||
needs:
|
||||
- hideout-core-setup
|
||||
@@ -187,11 +247,90 @@ jobs:
|
||||
name: 'hideout-mastodon.xml'
|
||||
path: 'hideout-mastodon/build/reports/kover/hideout-mastodon.xml'
|
||||
|
||||
hideout-activitypub-unit-test:
|
||||
needs:
|
||||
- hideout-activitypub-setup
|
||||
- change
|
||||
if: github.event.pull_request.draft == false && needs.change.outputs.activitypub == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.PAT }}
|
||||
|
||||
- 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: Unit Test
|
||||
run: ./hideout-activitypub/gradlew :hideout-activitypub:koverXmlReport
|
||||
|
||||
- name: JUnit Test Report
|
||||
uses: mikepenz/action-junit-report@v4
|
||||
with:
|
||||
report_paths: '**/TEST-*.xml'
|
||||
check_name: 'hideout-activitypub JUnit Test Report'
|
||||
|
||||
- name: Upload Coverage Report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: 'hideout-activitypub.xml'
|
||||
path: 'hideout-activitypub/build/reports/kover/hideout-activitypub.xml'
|
||||
|
||||
owl-unit-test:
|
||||
needs:
|
||||
- owl-setup
|
||||
- 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: 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: Unit Test
|
||||
run: ./owl/gradlew :owl:koverXmlReport
|
||||
|
||||
- name: JUnit Test Report
|
||||
uses: mikepenz/action-junit-report@v4
|
||||
with:
|
||||
report_paths: '**/TEST-*.xml'
|
||||
check_name: 'owl JUnit Test Report'
|
||||
|
||||
- name: Upload Coverage Report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: 'owl.xml'
|
||||
path: 'owl/build/reports/kover/owl.xml'
|
||||
|
||||
coverage:
|
||||
needs:
|
||||
- change
|
||||
- hideout-core-unit-test
|
||||
- hideout-mastodon-unit-test
|
||||
- hideout-activitypub-unit-test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download Coverage Report
|
||||
@@ -204,7 +343,9 @@ jobs:
|
||||
with:
|
||||
paths: |
|
||||
${{ github.workspace }}/hideout-core/build/reports/kover/hideout-core.xml/hideout-core.xml,
|
||||
${{ github.workspace }}/hideout-core/build/reports/kover/hideout-mastodon.xml/hideout-mastodon.xml
|
||||
${{ github.workspace }}/hideout-core/build/reports/kover/hideout-mastodon.xml/hideout-mastodon.xml,
|
||||
${{ github.workspace }}/hideout-core/build/reports/kover/hideout-activitypub.xml/hideout-activitypub.xml
|
||||
${{ github.workspace }}/hideout-core/build/reports/kover/owl.xml/owl.xml
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
title: Code Coverage
|
||||
update-comment: true
|
||||
@@ -216,6 +357,8 @@ jobs:
|
||||
- change
|
||||
- hideout-core-setup
|
||||
- hideout-mastodon-setup
|
||||
- hideout-activitypub-setup
|
||||
- owl-setup
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -239,7 +382,11 @@ jobs:
|
||||
gradle-home-cache-cleanup: true
|
||||
|
||||
- name: Lint
|
||||
run: ./gradlew :hideout-core:detektMain :hideout-mastodon:detektMain
|
||||
run: ./gradlew :hideout-core:detektMain :hideout-mastodon:detektMain :hideout-activitypub:detektMain
|
||||
|
||||
- name: owl Lint
|
||||
if: always()
|
||||
run: ./owl/gradlew :owl:detektMain
|
||||
|
||||
- name: Auto Commit
|
||||
if: ${{ always() }}
|
||||
|
||||
Reference in New Issue
Block a user