From e7f794f655ce2bfb17c8cd49e7c007f8f43c5b4c Mon Sep 17 00:00:00 2001 From: Oliver Bertuch Date: Tue, 15 Jun 2021 09:56:48 +0200 Subject: [PATCH 1/3] fix(ci): remove broken Travis CI config #7876 --- .../workflows/cypress_ui.yml.future | 17 +++++++++-------- .travis.yml | 5 ----- 2 files changed, 9 insertions(+), 13 deletions(-) rename .travis.yml.future => .github/workflows/cypress_ui.yml.future (74%) delete mode 100644 .travis.yml diff --git a/.travis.yml.future b/.github/workflows/cypress_ui.yml.future similarity index 74% rename from .travis.yml.future rename to .github/workflows/cypress_ui.yml.future index 8bd747625e4..b38ae2f9558 100644 --- a/.travis.yml.future +++ b/.github/workflows/cypress_ui.yml.future @@ -1,16 +1,17 @@ +############################################################################### +# +# THIS IS AN OLD TRAVIS-CI.ORG JOB FILE +# To be used with Github Actions, it would be necessary to refactor it. +# Keeping it as the future example it has been before. +# See also #5846 +# +############################################################################### + services: - docker jobs: include: - # Execute java unit- and integration tests - - stage: test - language: java - jdk: - - oraclejdk8 - script: mvn -DcompilerArgument=-Xlint:unchecked test -P all-unit-tests - after_success: mvn jacoco:report coveralls:report - # Execute Cypress for UI testing # see https://docs.cypress.io/guides/guides/continuous-integration.html - stage: test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 67de6619add..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: java -jdk: - - openjdk11 -script: mvn -DcompilerArgument=-Xlint:unchecked test -P all-unit-tests -after_success: mvn jacoco:report coveralls:report From efb4537bb70e38f2fd556c0c10e52cf014ff379a Mon Sep 17 00:00:00 2001 From: Oliver Bertuch Date: Tue, 15 Jun 2021 09:57:42 +0200 Subject: [PATCH 2/3] fix(ci): readd unit tests + code cov with Github Action #7876 --- .github/workflows/maven_unit_test.yml | 45 +++++++++++++++++++++++++++ pom.xml | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/maven_unit_test.yml diff --git a/.github/workflows/maven_unit_test.yml b/.github/workflows/maven_unit_test.yml new file mode 100644 index 00000000000..916f0e7ecbb --- /dev/null +++ b/.github/workflows/maven_unit_test.yml @@ -0,0 +1,45 @@ +name: Maven Unit Tests + +on: + push: + paths: + - "**.java" + pull_request: + paths: + - "**.java" + +jobs: + unittest: + name: (JDK ${{ matrix.jdk }} / ${{ matrix.os }}) Unit Tests + strategy: + fail-fast: false + matrix: + os: [ ubuntu-latest ] + jdk: [ '11' ] + #include: + # - os: ubuntu-latest + # jdk: '16' + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 11 + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.jdk }} + distribution: 'adopt' + - name: Cache Maven packages + uses: actions/cache@v2 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build with Maven + run: mvn -DcompilerArgument=-Xlint:unchecked -P all-unit-tests clean test + - name: Maven Code Coverage + env: + CI_NAME: github + BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }} + CI_BUILD_NUMBER: ${{ github.run_id }} + CI_BUILD_URL: https://github.com/${{ github.repository }}/commit/${{ github.event.after }}/checks + COVERALLS_SECRET: ${{ secrets.GITHUB_TOKEN }} + run: mvn -V -B jacoco:report coveralls:report -DrepoToken=${{ secrets.COVERALLS_TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index ca2d3570956..d3aaf2fc90e 100644 --- a/pom.xml +++ b/pom.xml @@ -783,7 +783,7 @@ org.eluder.coveralls coveralls-maven-plugin - 4.0.0 + 4.3.0 javax.xml.bind From 5d083f45fee1b9b840889fb65d851ce62cde2a49 Mon Sep 17 00:00:00 2001 From: Oliver Bertuch Date: Tue, 15 Jun 2021 10:13:59 +0200 Subject: [PATCH 3/3] DEMO GITHUB ACTION - THIS IS A DEMO COMMIT - DO NOT MERGE --- src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java b/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java index 71accdaa8c8..714185cb816 100644 --- a/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java +++ b/src/main/java/edu/harvard/iq/dataverse/util/SystemConfig.java @@ -43,9 +43,6 @@ public class SystemConfig { @EJB DataverseServiceBean dataverseService; - - @EJB - AuthenticationServiceBean authenticationService; public static final String DATAVERSE_PATH = "/dataverse/";