ci: 区分前后端的校验

This commit is contained in:
CaptainB 2024-05-21 11:30:44 +08:00 committed by 刘瑞斌
parent 1431e63a0e
commit a8dd4799f8
3 changed files with 45 additions and 2 deletions

View File

@ -2,9 +2,15 @@ on:
push:
branches:
- v3.*
paths:
- "backend/**"
- "pom.xml"
pull_request:
branches:
- v3.*
paths:
- "backend/**"
- "pom.xml"
name: MeterSphere 覆盖率统计
@ -25,8 +31,6 @@ jobs:
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
- name: Build with Maven - other
run: mvn -T 1C -B package --file pom.xml -pl '!frontend'
- name: Upload coverage reports to Codecov

33
.github/workflows/frontend-build.yml vendored Normal file
View File

@ -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

View File

@ -3,8 +3,14 @@ on:
push:
branches:
- v3.x
paths:
- "backend/**"
- "pom.xml"
pull_request:
types: [opened, synchronize, reopened]
paths:
- "backend/**"
- "pom.xml"
jobs:
build:
name: Build and analyze