ci: 区分前后端的校验
This commit is contained in:
parent
1431e63a0e
commit
a8dd4799f8
|
@ -2,9 +2,15 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- v3.*
|
- v3.*
|
||||||
|
paths:
|
||||||
|
- "backend/**"
|
||||||
|
- "pom.xml"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- v3.*
|
- v3.*
|
||||||
|
paths:
|
||||||
|
- "backend/**"
|
||||||
|
- "pom.xml"
|
||||||
|
|
||||||
name: MeterSphere 覆盖率统计
|
name: MeterSphere 覆盖率统计
|
||||||
|
|
||||||
|
@ -25,8 +31,6 @@ jobs:
|
||||||
cache: 'maven'
|
cache: 'maven'
|
||||||
cache-dependency-path: '**/pom.xml' # optional
|
cache-dependency-path: '**/pom.xml' # optional
|
||||||
check-latest: true
|
check-latest: true
|
||||||
- name: Build with Maven - only frontend
|
|
||||||
run: mvn -T 1C -B package --file pom.xml -pl frontend
|
|
||||||
- name: Build with Maven - other
|
- name: Build with Maven - other
|
||||||
run: mvn -T 1C -B package --file pom.xml -pl '!frontend'
|
run: mvn -T 1C -B package --file pom.xml -pl '!frontend'
|
||||||
- name: Upload coverage reports to Codecov
|
- name: Upload coverage reports to Codecov
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- v3.*
|
||||||
|
paths:
|
||||||
|
- "frontend/**"
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- v3.*
|
||||||
|
paths:
|
||||||
|
- "frontend/**"
|
||||||
|
|
||||||
|
name: MeterSphere 前端代码校验
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
generic_handler:
|
||||||
|
name: 前端代码校验
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Set up JDK 21
|
||||||
|
uses: actions/setup-java@v3
|
||||||
|
with:
|
||||||
|
distribution: 'zulu'
|
||||||
|
java-version: 21
|
||||||
|
cache: 'maven'
|
||||||
|
cache-dependency-path: '**/pom.xml' # optional
|
||||||
|
check-latest: true
|
||||||
|
- name: Build with Maven - only frontend
|
||||||
|
run: mvn -T 1C -B package --file pom.xml -pl frontend
|
|
@ -3,8 +3,14 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- v3.x
|
- v3.x
|
||||||
|
paths:
|
||||||
|
- "backend/**"
|
||||||
|
- "pom.xml"
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
|
paths:
|
||||||
|
- "backend/**"
|
||||||
|
- "pom.xml"
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build and analyze
|
name: Build and analyze
|
||||||
|
|
Loading…
Reference in New Issue