feat(内核): 换模拟数据端点 #31
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: Checker | |
on: | |
push: | |
pull_request: | |
branches: [ "dev" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [ '8', '11', '17' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'temurin' | |
cache: maven | |
- name: Check Code Style | |
run: ./mvnw checkstyle:check | |
- name: Check Spotbugs | |
run: ./mvnw spotbugs:check | |
- name: Build with Maven | |
run: ./mvnw -B clean package | |
- name: Upload Test Results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-${{ matrix.java }} | |
path: target/surefire-reports/ | |
- name: Upload Coverage Report | |
if: matrix.java == '8' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: coverage-report | |
path: target/site/jacoco/ | |
- name: Report Coverage to Codecov | |
if: matrix.java == '8' | |
uses: codecov/codecov-action@v3 | |
with: | |
file: target/site/jacoco/jacoco.xml | |
dependency-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: maven | |
- name: Run Dependency Check | |
run: ./mvnw org.owasp:dependency-check-maven:check | |
- name: Upload Dependency Check Results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dependency-check-report | |
path: target/dependency-check-report.html |