diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 00b132aedc..a0b11c7ffb 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -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 diff --git a/.github/workflows/frontend-build.yml b/.github/workflows/frontend-build.yml new file mode 100644 index 0000000000..ea0afd4c71 --- /dev/null +++ b/.github/workflows/frontend-build.yml @@ -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 diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index ae6464e901..8c007d3047 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -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