Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add build and test workflow * Adjust source and target levels * Enable jacoco coverage profile * Update jacoco plugin version See jacoco/jacoco#1132 for JDK 17 support. Signed-off-by: David Greven <fixed-term.David.Greven@de.bosch.com>
- Loading branch information
1 parent
d10625a
commit e828ed1
Showing
2 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# | ||
# Copyright (c) 2021 - for information on the respective copyright owner | ||
# see the NOTICE file and/or the repository https://github.com/carbynestack/cli-ng. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
name: Build and test artifacts | ||
on: push | ||
jobs: | ||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v2 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
- name: Setting up Github Package Repository as Maven Repository | ||
uses: s4u/maven-settings-action@v2 | ||
with: | ||
githubServer: false | ||
servers: | | ||
[{ | ||
"id": "github", | ||
"username": "${{ secrets.GHPR_USERNAME }}", | ||
"password": "${{ secrets.GHPR_TOKEN }}" | ||
}] | ||
- name: Build with Maven | ||
run: mvn install -Dskip.tests --batch-mode --update-snapshots --no-transfer-progress | ||
- name: Run Tests | ||
run: mvn verify --activate-profiles coverage --batch-mode --no-transfer-progress | ||
- name: Collect Jacoco reports | ||
run: echo ::set-output name=reports::$(find . -regex '.*/target/site/jacoco/jacoco.xml' | tr '\n' ',' | sed 's/.$//') | ||
id: jacoco | ||
- uses: codecov/codecov-action@v2 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ${{ steps.jacoco.outputs.reports }} | ||
name: codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters