优化消息事件相关的类型继承关系结构;增加部分对发送文本消息以及MessageEntity的元素支持 #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Branch | |
on: | |
pull_request: | |
branches: | |
- 'dev/**' | |
paths: | |
- '**.java' | |
- '**.kt' | |
- '**.kts' | |
- '*/src/*/kotlin/**' | |
- '*/src/*/java/**' | |
- '*/src/*/resource/**' | |
- 'gradle/**' | |
concurrency: | |
group: '${{ github.workflow }}-${{ github.ref }}' | |
cancel-in-progress: true | |
env: | |
IS_CI: true | |
GRADLE_OPTS: "-Dfile.encoding=UTF-8" | |
jobs: | |
build-test: | |
name: Build and test | |
strategy: | |
matrix: | |
os: [ macos-latest, windows-latest, ubuntu-latest ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
cache: 'gradle' | |
- name: Run All Tests | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-version: 8.5 | |
arguments: | | |
assemble | |
build | |
allTests | |
--info | |
--warning-mode all | |
# --build-cache | |
# -Porg.gradle.daemon=false | |
# -Porg.gradle.jvmargs="-Xmx4g -Xms2g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8" | |
- name: Upload test reports | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: test-reports-${{ runner.os }} | |
path: '**/build/reports/tests' | |
retention-days: 7 | |
detekt-check: | |
name: Detekt check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: 21 | |
cache: 'gradle' | |
- name: Run All Tests | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-version: 8.5 | |
arguments: detekt | |
- name: Upload detekt reports | |
uses: actions/upload-artifact@v4 | |
if: ${{ always() }} | |
with: | |
name: detekt-reports | |
path: 'build/reports/detekt' | |
retention-days: 7 | |
# https://detekt.dev/docs/introduction/reporting/#integration-with-github-code-scanning | |
# Make sure we always run this upload task, | |
# because the previous step may fail if there are findings. | |
- name: Upload SARIF to GitHub using the upload-sarif action | |
uses: github/codeql-action/upload-sarif@v2 | |
if: ${{ always() }} | |
with: | |
sarif_file: 'build/reports/detekt/detekt.sarif' |