File tree Expand file tree Collapse file tree 3 files changed +36
-4
lines changed
Expand file tree Collapse file tree 3 files changed +36
-4
lines changed Original file line number Diff line number Diff line change 1- name : Run Unit Tests
1+ name : Tests and Code Coverage
22
33on :
44 pull_request :
88
99jobs :
1010 test :
11- name : Unit Tests
11+ name : Run Tests and Generate Coverage
1212 runs-on : ubuntu-latest
1313
1414 steps :
3434 </servers>
3535 </settings>
3636 EOF
37- - name : Run Unit Tests
38- run : mvn clean test
37+
38+ - name : Run tests with coverage
39+ run : mvn clean verify
40+
41+ - name : Upload coverage to Codecov
42+ uses : codecov/codecov-action@v5
43+ with :
44+ token : ${{ secrets.CODECOV_TOKEN }}
45+ files : target/site/jacoco/jacoco.xml
46+ fail_ci_if_error : true
47+ slug : bigboxer23/switchbotapi-java
Original file line number Diff line number Diff line change 1+ [ ![ CodeQL] ( https://github.com/bigboxer23/switchbotapi-java/actions/workflows/codeql.yml/badge.svg )] ( https://github.com/bigboxer23/switchbotapi-java/actions/workflows/codeql.yml )
2+ [ ![ Build Status] ( https://github.com/bigboxer23/switchbotapi-java/actions/workflows/unittests.yml/badge.svg )] ( https://github.com/bigboxer23/switchbotapi-java/actions/workflows/unittests.yml )
3+ [ ![ codecov] ( https://codecov.io/gh/bigboxer23/switchbotapi-java/branch/main/graph/badge.svg )] ( https://codecov.io/gh/bigboxer23/switchbotapi-java )
4+
15# SwitchBotAPI-java
26
37This project provides a java wrapper over the SwitchBot API v1.1 (https://github.com/OpenWonderLabs/SwitchBotAPI )
Original file line number Diff line number Diff line change 159159 </plugins >
160160 </pluginManagement >
161161 <plugins >
162+ <plugin >
163+ <groupId >org.jacoco</groupId >
164+ <artifactId >jacoco-maven-plugin</artifactId >
165+ <version >0.8.13</version >
166+ <executions >
167+ <execution >
168+ <goals >
169+ <goal >prepare-agent</goal >
170+ </goals >
171+ </execution >
172+ <execution >
173+ <id >report</id >
174+ <goals >
175+ <goal >report</goal >
176+ </goals >
177+ <phase >test</phase >
178+ </execution >
179+ </executions >
180+ </plugin >
162181 <plugin >
163182 <groupId >com.diffplug.spotless</groupId >
164183 <artifactId >spotless-maven-plugin</artifactId >
You can’t perform that action at this time.
0 commit comments