test(validator): 添加 assertLength() 和 assertRange() 的测试用例 #173
This file contains hidden or 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: Java CI | |
| on: | |
| push: | |
| # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-excluding-paths | |
| paths-ignore: | |
| - 'docs/**' | |
| - '**.md' | |
| pull_request: | |
| paths-ignore: | |
| - 'docs/**' | |
| - '**.md' | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest, macos-latest ] | |
| java: [ 8, 11, 17, 21, 25 ] | |
| fail-fast: false | |
| max-parallel: 16 | |
| name: Test on JDK ${{ matrix.java }} OS ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set execute permission for mvnw | |
| run: chmod +x mvnw | |
| - name: Set up JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: ${{ matrix.java }} | |
| cache: maven | |
| - name: Build with Maven and generate code coverage | |
| run: ./mvnw -V --no-transfer-progress clean package | |
| env: | |
| JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8 -Duser.timezone=Asia/Shanghai | |
| # https://github.com/marketplace/actions/codecov | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: CodePlayer/ready-x | |
| verbose: true |