File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Java CI
2+
3+ on :
4+ push :
5+ branches-ignore :
6+ - master
7+ pull_request :
8+ branches :
9+ - master
10+ workflow_dispatch :
11+
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Set up JDK 17
21+ uses : actions/setup-java@v4
22+ with :
23+ java-version : ' 17'
24+ distribution : ' temurin'
25+
26+ - name : Build & Run Tests (no Tomcat)
27+ run : ant -noinput -buildfile ci-build.xml test
28+
29+ - name : Report test results
30+ if : always()
31+ uses : dorny/test-reporter@v2
32+ with :
33+ name : Ant Unit Tests
34+ path : build/test-results/*.xml
35+ reporter : java-junit
Original file line number Diff line number Diff line change 1414 <mkdir dir =" ${classes.dir}" />
1515 <javac srcdir =" ${src.dir}" destdir =" ${classes.dir}" includeantruntime =" false" >
1616 <classpath >
17- <fileset dir =" web/WEB-INF/lib" erroronmissingdir = " false " >
17+ <fileset dir =" web/WEB-INF/lib" >
1818 <include name =" **/*.jar" />
1919 </fileset >
2020 </classpath >
2626 <javac srcdir =" ${test.dir}" destdir =" ${test.classes.dir}" includeantruntime =" false" >
2727 <classpath >
2828 <pathelement path =" ${classes.dir}" />
29- <fileset dir =" web/WEB-INF/lib" erroronmissingdir = " false " >
29+ <fileset dir =" web/WEB-INF/lib" >
3030 <include name =" **/*.jar" />
3131 </fileset >
3232 </classpath >
3939 <classpath >
4040 <pathelement path =" ${classes.dir}" />
4141 <pathelement path =" ${test.classes.dir}" />
42- <fileset dir =" web/WEB-INF/lib" erroronmissingdir = " false " >
42+ <fileset dir =" web/WEB-INF/lib" >
4343 <include name =" **/*.jar" />
4444 </fileset >
4545 </classpath >
46+ <!-- Thêm 2 formatter: plain để log, xml để test-reporter đọc -->
4647 <formatter type =" plain" />
48+ <formatter type =" xml" />
4749 <batchtest todir =" ${build.dir}/test-results" >
4850 <fileset dir =" ${test.dir}" >
4951 <include name =" **/*Test.java" />
You can’t perform that action at this time.
0 commit comments