Skip to content

Commit f0c9562

Browse files
authored
maintenance: send coverage (jacoco) to codecov (#1094)
send coverage (jacoco) to codecov
1 parent 5d7f2e6 commit f0c9562

File tree

5 files changed

+39
-23
lines changed

5 files changed

+39
-23
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ jobs:
4949
java: [8, 8.0.192, 11.0.x, 11.0.3, 12, 13, 15, 16, 17 ]
5050
name: Java ${{ matrix.java }}
5151
env:
52-
OS: ${{ matrix.os }}
53-
JAVA: ${{ matrix.java-version }}
52+
JAVA: ${{ matrix.java }}
5453
AWS_REGION: eu-west-1
5554
steps:
5655
- uses: actions/checkout@v3
@@ -59,8 +58,14 @@ jobs:
5958
with:
6059
distribution: 'zulu'
6160
java-version: ${{ matrix.java }}
61+
cache: 'maven'
6262
- name: Build with Maven
6363
run: mvn -Pbuild-without-spotbugs -B package --file pom.xml
64+
- name: Upload coverage to Codecov
65+
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # 3.1.1
66+
if: ${{ matrix.java == '11.0.x' }} # publish results once
67+
with:
68+
files: ./powertools-cloudformation/target/site/jacoco/jacoco.xml,./powertools-core/target/site/jacoco/jacoco.xml,./powertools-idempotency/target/site/jacoco/jacoco.xml,./powertools-logging/target/site/jacoco/jacoco.xml,./powertools-metrics/target/site/jacoco/jacoco.xml,./powertools-parameters/target/site/jacoco/jacoco.xml,./powertools-serialization/target/site/jacoco/jacoco.xml,./powertools-sqs/target/site/jacoco/jacoco.xml,./powertools-tracing/target/site/jacoco/jacoco.xml,./powertools-validation/target/site/jacoco/jacoco.xml
6469
savepr:
6570
runs-on: ubuntu-latest
6671
name: Save PR number if running on PR by dependabot
@@ -72,7 +77,7 @@ jobs:
7277
echo ${{ github.event.number }}
7378
echo ${{ github.event.number }} > ./pr/NR
7479
- uses: actions/upload-artifact@v2
75-
name: Updload artifact
80+
name: Upload artifact
7681
with:
7782
name: pr
7883
path: pr/

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# AWS Lambda Powertools for Java
22

3-
![aws provider](https://img.shields.io/badge/provider-AWS-orange?logo=amazon-aws&color=ff9900) ![Build status](https://github.com/awslabs/aws-lambda-powertools-java/actions/workflows/build.yml/badge.svg) ![Maven Central](https://img.shields.io/maven-central/v/software.amazon.lambda/powertools-parent)
3+
![aws provider](https://img.shields.io/badge/provider-AWS-orange?logo=amazon-aws&color=ff9900) ![Build status](https://github.com/awslabs/aws-lambda-powertools-java/actions/workflows/build.yml/badge.svg) ![Maven Central](https://img.shields.io/maven-central/v/software.amazon.lambda/powertools-parent) [![codecov.io](https://codecov.io/github/awslabs/aws-lambda-powertools-java/branch/master/graphs/badge.svg)](https://app.codecov.io/gh/awslabs/aws-lambda-powertools-java)
4+
45

56
Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.
67

examples/pom.xml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,32 @@
3232
<maven.deploy.skip>true</maven.deploy.skip>
3333
</properties>
3434

35+
<build>
36+
<plugins>
37+
<plugin> <!-- skip coverage for examples -->
38+
<groupId>org.jacoco</groupId>
39+
<artifactId>jacoco-maven-plugin</artifactId>
40+
<executions>
41+
<execution>
42+
<goals>
43+
<goal>prepare-agent</goal>
44+
</goals>
45+
<configuration>
46+
<skip>true</skip>
47+
</configuration>
48+
</execution>
49+
<execution>
50+
<id>report</id>
51+
<goals>
52+
<goal>report</goal>
53+
</goals>
54+
<configuration>
55+
<skip>true</skip>
56+
</configuration>
57+
</execution>
58+
</executions>
59+
</plugin>
60+
</plugins>
61+
</build>
62+
3563
</project>

examples/powertools-examples-validation/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@
66
<name>AWS Lambda Powertools for Java library Examples - Validation</name>
77

88
<parent>
9-
<artifactId>powertools-parent</artifactId>
9+
<artifactId>powertools-examples</artifactId>
1010
<groupId>software.amazon.lambda</groupId>
1111
<version>1.14.0</version>
1212
</parent>
1313

14-
1514
<dependencies>
1615
<dependency>
1716
<groupId>software.amazon.lambda</groupId>

pom.xml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
<aspectj-maven-plugin.version>1.14.0</aspectj-maven-plugin.version>
7171
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
7272
<jacoco-maven-plugin.version>0.8.8</jacoco-maven-plugin.version>
73-
<cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
7473
<nexus-staging-maven-plugin.version>1.6.8</nexus-staging-maven-plugin.version>
7574
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
7675
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
@@ -321,11 +320,6 @@
321320
<artifactId>jacoco-maven-plugin</artifactId>
322321
<version>${jacoco-maven-plugin.version}</version>
323322
</plugin>
324-
<plugin>
325-
<groupId>org.codehaus.mojo</groupId>
326-
<artifactId>cobertura-maven-plugin</artifactId>
327-
<version>${cobertura-maven-plugin.version}</version>
328-
</plugin>
329323
<plugin>
330324
<groupId>org.sonatype.plugins</groupId>
331325
<artifactId>nexus-staging-maven-plugin</artifactId>
@@ -409,17 +403,6 @@
409403
</execution>
410404
</executions>
411405
</plugin>
412-
<plugin>
413-
<groupId>org.codehaus.mojo</groupId>
414-
<artifactId>cobertura-maven-plugin</artifactId>
415-
<configuration>
416-
<formats>
417-
<format>html</format>
418-
<format>xml</format>
419-
</formats>
420-
<check />
421-
</configuration>
422-
</plugin>
423406
<plugin>
424407
<groupId>org.sonatype.plugins</groupId>
425408
<artifactId>nexus-staging-maven-plugin</artifactId>

0 commit comments

Comments
 (0)