mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-07-01 21:07:23 +00:00
ci(github-action): 启用 API 二进制兼容性验证. (#37)
使用二进制兼容验证, 可以快速了解 API 是否出现修改, 这个功能有利于防止无意中修改 API. 引入该过程后, 需谨慎检查 api 列表, 以确保改动是必须的. 当 api 出现改动时, 需按照改动类型分配合适的版本号(遵循 SemVer 规范).
This commit is contained in:
36
.github/workflows/binary-compatibility-verification.yml
vendored
Normal file
36
.github/workflows/binary-compatibility-verification.yml
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
name: Binary compatibility verification (for API)
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'scalabot-meta/**'
|
||||
- 'scalabot-extension/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'scalabot-meta/**'
|
||||
- 'scalabot-extension/**'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
apiCompatibilityCheck:
|
||||
timeout-minutes: 8
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt-hotspot'
|
||||
cache: 'gradle'
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Build and run binary compatibility verification
|
||||
uses: gradle/gradle-build-action@v2.4.0
|
||||
with:
|
||||
gradle-version: 'wrapper'
|
||||
arguments: apiCheck
|
Reference in New Issue
Block a user