Skip to content

Commit 430fa64

Browse files
authored
Merge pull request #21 from securenative/dev
Added coverage
2 parents 9df6b50 + b7fcd11 commit 430fa64

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

.github/workflows/build.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
- dev-*
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Notify slack success
15+
if: success()
16+
id: slack # IMPORTANT: reference this step ID value in future Slack steps
17+
env:
18+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
19+
uses: voxmedia/[email protected]
20+
with:
21+
channel: github-actions
22+
status: STARTING
23+
color: warning
24+
25+
- uses: actions/checkout@v2
26+
- name: Set up JDK 1.8
27+
uses: actions/setup-java@v1
28+
with:
29+
java-version: 1.8
30+
31+
- name: Build
32+
run: mvn -B package --file pom.xml
33+
34+
- name: Run Tests
35+
run: mvn test
36+
37+
- name: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v1
39+
with:
40+
token: ${{ secrets.CODECOV_TOKEN }}
41+
flags: unittests
42+
name: codecov-umbrella
43+
fail_ci_if_error: true
44+
45+
- name: Notify slack success
46+
if: success()
47+
env:
48+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
49+
uses: voxmedia/[email protected]
50+
with:
51+
message_id: ${{ steps.slack.outputs.message_id }}
52+
channel: github-actions
53+
status: SUCCESS
54+
color: good
55+
56+
- name: Notify slack fail
57+
if: failure()
58+
env:
59+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
60+
uses: voxmedia/[email protected]
61+
with:
62+
message_id: ${{ steps.slack.outputs.message_id }}
63+
channel: github-actions
64+
status: FAILED
65+
color: danger

pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,25 @@
268268
<useFile>false</useFile>
269269
</configuration>
270270
</plugin>
271+
<plugin>
272+
<groupId>org.jacoco</groupId>
273+
<artifactId>jacoco-maven-plugin</artifactId>
274+
<version>0.8.3</version>
275+
<executions>
276+
<execution>
277+
<goals>
278+
<goal>prepare-agent</goal>
279+
</goals>
280+
</execution>
281+
<execution>
282+
<id>report</id>
283+
<phase>test</phase>
284+
<goals>
285+
<goal>report</goal>
286+
</goals>
287+
</execution>
288+
</executions>
289+
</plugin>
271290
</plugins>
272291
</build>
273292

0 commit comments

Comments
 (0)