Skip to content

Commit

Permalink
Add Jacoco
Browse files Browse the repository at this point in the history
  • Loading branch information
kapilgain committed Dec 17, 2023
1 parent 355f035 commit b052dae
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Java CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Maven
run: mvn -B package --file pom.xml
33 changes: 33 additions & 0 deletions .idea/runConfigurations/Jacoco.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Main.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Advent of TDD

![Java CI](https://github.com/kapilgain/advent-of-tdd/actions/workflows/maven.yml/badge.svg)

A follow along workshop to introduce the idea and concepts of using TDD for [Advent of Code](https://adventofcode.com) problems.

## Introduction
Expand Down
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,28 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
4 changes: 2 additions & 2 deletions src/main/java/org/advent/Main.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.advent;

import org.advent.day17.Day17;
import org.advent.day18.Day18;

public class Main {

public static void main(String[] args) {
new Day17().run();
new Day18().run();
}

}

0 comments on commit b052dae

Please sign in to comment.