Merge pull request #192 from PaulBoon/AddPatch5Tov6.0 #313
Workflow file for this run
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
name: Maven Unit Tests | |
on: | |
push: | |
paths: | |
- "**.java" | |
- "pom.xml" | |
- "modules/**/pom.xml" | |
- "!modules/container-base/**" | |
- "!modules/dataverse-spi/**" | |
pull_request: | |
paths: | |
- "**.java" | |
- "pom.xml" | |
- "modules/**/pom.xml" | |
- "!modules/container-base/**" | |
- "!modules/dataverse-spi/**" | |
jobs: | |
unittest: | |
name: (${{ matrix.status}} / JDK ${{ matrix.jdk }}) Unit Tests | |
strategy: | |
fail-fast: false | |
matrix: | |
jdk: [ '17' ] | |
experimental: [false] | |
status: ["Stable"] | |
continue-on-error: ${{ matrix.experimental }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK ${{ matrix.jdk }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: ${{ matrix.jdk }} | |
distribution: temurin | |
cache: maven | |
# The reason why we use "install" here is that we want the submodules to be available in the next step. | |
# Also, we can cache them this way for jobs triggered by this one. | |
- name: Build with Maven | |
run: > | |
mvn -B -f modules/dataverse-parent | |
-Dtarget.java.version=${{ matrix.jdk }} | |
-DcompilerArgument=-Xlint:unchecked -P all-unit-tests | |
-pl edu.harvard.iq:dataverse -am | |
install | |
- name: Maven Code Coverage | |
env: | |
CI_NAME: github | |
COVERALLS_SECRET: ${{ secrets.GITHUB_TOKEN }} | |
# The coverage commit is sometimes flaky. Don't bail out just because this optional step failed. | |
continue-on-error: true | |
run: > | |
mvn -B | |
-DrepoToken=${COVERALLS_SECRET} -DpullRequest=${{ github.event.number }} | |
jacoco:report coveralls:report | |
# We don't want to cache the WAR file, so delete it | |
- run: rm -rf ~/.m2/repository/edu/harvard/iq/dataverse | |
# Upload the built war file. For download, it will be wrapped in a ZIP by GitHub. | |
# See also https://github.com/actions/upload-artifact#zipped-artifact-downloads | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dataverse-java${{ matrix.jdk }}.war | |
path: target/dataverse*.war | |
retention-days: 7 | |
push-app-img: | |
name: Publish App Image | |
permissions: | |
contents: read | |
packages: write | |
pull-requests: write | |
needs: unittest | |
uses: ./.github/workflows/container_app_push.yml | |
secrets: inherit |