Tested dev under 6.1.1 + 9276-init-ontoportal-integration #96
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: [ '11' ] | |
experimental: [false] | |
status: ["Stable"] | |
# | |
# JDK 17 builds disabled due to non-essential fails marking CI jobs as completely failed within | |
# Github Projects, PR lists etc. This was consensus on Slack #dv-tech. See issue #8094 | |
# (This is a limitation of how Github is currently handling these things.) | |
# | |
#include: | |
# - jdk: '17' | |
# experimental: true | |
# status: "Experimental" | |
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 | |
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 |