Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run Unit Tests
name: Tests and Code Coverage

on:
pull_request:
Expand All @@ -8,7 +8,7 @@ on:

jobs:
test:
name: Unit Tests
name: Run Tests and Generate Coverage
runs-on: ubuntu-latest

steps:
Expand All @@ -34,5 +34,14 @@ jobs:
</servers>
</settings>
EOF
- name: Run Unit Tests
run: mvn clean test

- name: Run tests with coverage
run: mvn clean verify

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: target/site/jacoco/jacoco.xml
fail_ci_if_error: true
slug: bigboxer23/switchbotapi-java
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[![CodeQL](https://github.com/bigboxer23/switchbotapi-java/actions/workflows/codeql.yml/badge.svg)](https://github.com/bigboxer23/switchbotapi-java/actions/workflows/codeql.yml)
[![Build Status](https://github.com/bigboxer23/switchbotapi-java/actions/workflows/unittests.yml/badge.svg)](https://github.com/bigboxer23/switchbotapi-java/actions/workflows/unittests.yml)
[![codecov](https://codecov.io/gh/bigboxer23/switchbotapi-java/branch/main/graph/badge.svg)](https://codecov.io/gh/bigboxer23/switchbotapi-java)

# SwitchBotAPI-java

This project provides a java wrapper over the SwitchBot API v1.1 (https://github.com/OpenWonderLabs/SwitchBotAPI)
Expand Down
19 changes: 19 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,25 @@
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.13</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
Expand Down