Skip to content

Commit

Permalink
chore: add plugin to locate and run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianbormann committed Mar 2, 2024
1 parent 6ef6f5b commit f8b1bef
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@ jobs:
if: github.ref == 'refs/heads/main'
with:
BRANCH: gh-pages
folder: target/site/jacoco
folder: validation/target/site/jacoco
target-folder: coverage-report/

- name: ✅ Generate JaCoCo Badge
uses: cicirello/jacoco-badge-generator@v2
if: github.ref == 'refs/heads/main'
with:
generate-branches-badge: true
badges-directory: build/reports/jacoco/test/html/badges
jacoco-csv-file: validation/target/site/jacoco/jacoco.csv
badges-directory: validation/build/reports/jacoco/test/html/badges

- name: 💾 Log coverage percentage
run: |
Expand All @@ -72,5 +73,5 @@ jobs:
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
folder: build/reports/jacoco/test/html/badges
folder: validation/build/reports/jacoco/test/html/badges
target-folder: badges/
14 changes: 13 additions & 1 deletion validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>

<artifactId>cf-rewards-validation</artifactId>
<description>A Spring boot project to validate Cardano reward calcuation</description>
<description>A Spring boot project to validate Cardano reward calculation</description>

<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -146,6 +146,18 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>

</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package org.cardanofoundation.rewards;

import org.springframework.boot.test.context.SpringBootTest;

import org.junit.jupiter.api.Test;
import org.springframework.test.context.TestPropertySource;

@SpringBootTest(classes = RewardsApplication.class)
@TestPropertySource(locations = { "classpath:application.yaml" })
class RewardsApplicationTests {
@Test
void contextLoads() {}
Expand Down

0 comments on commit f8b1bef

Please sign in to comment.