代码优化 #137
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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Servlet TCK测试 | |
on: | |
push: | |
branches: [ "master" ] | |
paths-ignore: | |
- 'pages/**' | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/checkout@v4 | |
name: 下载servlet TCK | |
with: | |
repository: jakartaee/servlet | |
ref: c4a04f1f1a9ea747efb22f5234abdf598356d2e9 | |
path: jakartaee/servlet | |
- uses: actions/checkout@v4 | |
name: 下载 smart-http | |
with: | |
repository: smartboot/smart-http | |
path: smart-http | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set up Maven 3.9 | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: '3.9.0' | |
- name: Build smart-http | |
run: mvn -B install --file smart-http/pom.xml -Dmaven.compiler.source=8 -Dmaven.compiler.target=8 | |
- name: Build servlet TCK with Maven | |
run: mvn -B install --file jakartaee/servlet/pom.xml | |
- name: Build smart-servlet with Maven | |
run: mvn -B install --file pom.xml | |
# - name: Build with Maven | |
# run: mvn -B verify --file tck/pom.xml -Dbasedir=tck_tmp -Dmaven.test.failure.ignore=true | |
- name: 执行 TCK 测试 | |
run: mvn -B surefire-report:report --file tck/pom.xml | |
- name: 查看目录 | |
run: ls -lh tck/target/ | |
- name: 上传TCK报告 | |
uses: actions/upload-artifact@v4 | |
if: always() # 确保即使有失败的测试也会上传报告 | |
with: | |
name: test-report | |
path: tck/target/reports |