File tree 2 files changed +62
-4
lines changed
2 files changed +62
-4
lines changed Original file line number Diff line number Diff line change @@ -28,26 +28,57 @@ jobs:
28
28
steps :
29
29
- name : Checkout
30
30
uses : actions/checkout@v4
31
-
32
31
- name : Get private repo
33
32
uses : actions/checkout@v4
34
33
with :
35
34
repository : alien11689/advent-of-code
36
35
ref : master
37
36
token : ${{ secrets.ADVENT_OF_CODE_PAT}}
38
37
path : private
39
-
40
38
- name : Set up Java
41
39
uses : actions/setup-java@v4
42
40
with :
43
41
java-version : ' 21'
44
42
distribution : ' temurin'
45
-
46
- - name : Run
43
+ - name : Prepare resources
47
44
run : |
48
45
mkdir -p ${{matrix.year}}/src/main/resources
49
46
cp -r private/${{matrix.year}}/src/main/resources/* ${{matrix.year}}/src/main/resources
47
+ - name : Run
48
+ run : |
50
49
echo '```' > out
51
50
./runSingle.sh ${{matrix.year}} >> out
52
51
echo '```' >> out
53
52
cat out >> "$GITHUB_STEP_SUMMARY"
53
+
54
+ Coverage :
55
+ runs-on : ubuntu-latest
56
+ strategy :
57
+ matrix :
58
+ year : [2024]
59
+ steps :
60
+ - name : Checkout
61
+ uses : actions/checkout@v4
62
+ - name : Get private repo
63
+ uses : actions/checkout@v4
64
+ with :
65
+ repository : alien11689/advent-of-code
66
+ ref : master
67
+ token : ${{ secrets.ADVENT_OF_CODE_PAT}}
68
+ path : private
69
+ - name : Set up Java
70
+ uses : actions/setup-java@v4
71
+ with :
72
+ java-version : ' 21'
73
+ distribution : ' temurin'
74
+ - name : Prepare resources
75
+ run : |
76
+ mkdir -p ${{matrix.year}}/src/main/resources
77
+ cp -r private/${{matrix.year}}/src/main/resources/* ${{matrix.year}}/src/main/resources
78
+ - name : Run
79
+ run : ./mvnw clean test -Pcoverage -am -pl ${{ matrix.year }}
80
+ - name : Upload coverage
81
+ uses : codecov/codecov-action@v3
82
+ with :
83
+ fail_ci_if_error : true
84
+ token : ${{ secrets.CODECOV_TOKEN }}
Original file line number Diff line number Diff line change 21
21
<native-maven-plugin .version>0.10.4</native-maven-plugin .version>
22
22
<imageName >AOC${project.artifactId}</imageName >
23
23
<junit5 .version>5.11.4</junit5 .version>
24
+ <jacoco-maven-plugin .version>0.8.12</jacoco-maven-plugin .version>
24
25
</properties >
25
26
26
27
<dependencies >
126
127
</plugins >
127
128
</build >
128
129
</profile >
130
+ <profile >
131
+ <id >coverage</id >
132
+ <build >
133
+ <plugins >
134
+ <plugin >
135
+ <groupId >org.jacoco</groupId >
136
+ <artifactId >jacoco-maven-plugin</artifactId >
137
+ <version >${jacoco-maven-plugin.version} </version >
138
+ <executions >
139
+ <execution >
140
+ <goals >
141
+ <goal >prepare-agent</goal >
142
+ </goals >
143
+ </execution >
144
+ <execution >
145
+ <id >report</id >
146
+ <phase >test</phase >
147
+ <goals >
148
+ <goal >report</goal >
149
+ </goals >
150
+ </execution >
151
+ </executions >
152
+ </plugin >
153
+ </plugins >
154
+ </build >
155
+ </profile >
129
156
</profiles >
130
157
131
158
</project >
You can’t perform that action at this time.
0 commit comments