diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..95f0cd4 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,42 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + runs-on: ubuntu-latest + permissions: + contents: read + actions: read + checks: write + + steps: + - uses: actions/checkout@v4 + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Run tests + run: ./gradlew test + + - name: Generate test report + run: ./gradlew jacocoTestReport + if: always() + + - name: Publish test results + uses: dorny/test-reporter@v1 + if: always() + with: + name: Test Results + path: build/test-results/test/*.xml + reporter: java-junit diff --git a/README.md b/README.md index 27d2222..a8576f9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Gallop 🐎 XRechnung Library +[![Tests](https://github.com/codebarista-de/gallop/actions/workflows/test.yml/badge.svg)](https://github.com/codebarista-de/gallop/actions/workflows/test.yml) + Gallop is a Java library for creating electronic invoices (E-Invoices) compliant to the [XRechnung standard](https://xeinkauf.de/dokumente/).