Skip to content

Commit 3ca5de3

Browse files
authored
add workflow to run tests, add test badge (#4)
1 parent b242a1f commit 3ca5de3

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/test.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
actions: read
15+
checks: write
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up JDK 17
21+
uses: actions/setup-java@v4
22+
with:
23+
java-version: '17'
24+
distribution: 'temurin'
25+
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@v4
28+
29+
- name: Run tests
30+
run: ./gradlew test
31+
32+
- name: Generate test report
33+
run: ./gradlew jacocoTestReport
34+
if: always()
35+
36+
- name: Publish test results
37+
uses: dorny/test-reporter@v1
38+
if: always()
39+
with:
40+
name: Test Results
41+
path: build/test-results/test/*.xml
42+
reporter: java-junit

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Gallop 🐎 XRechnung Library
22

3+
[![Tests](https://github.com/codebarista-de/gallop/actions/workflows/test.yml/badge.svg)](https://github.com/codebarista-de/gallop/actions/workflows/test.yml)
4+
35
Gallop is a Java library for creating electronic invoices (E-Invoices) compliant to
46
the [XRechnung standard](https://xeinkauf.de/dokumente/).
57

0 commit comments

Comments
 (0)