diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index ecf89ae..f71134f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -4,13 +4,16 @@ name: Java CI with Maven on: + workflow_dispatch: push: branches: [main] pull_request: branches: [main] env: - MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 +# extra argument taken from: +# https://github.com/actions/virtual-environments/issues/1499#issuecomment-689467080 jobs: build: @@ -25,6 +28,4 @@ jobs: distribution: "adopt" cache: maven - name: Build with Maven - run: mvn -B package --file pom.xml # add -X -V for debugging -# extra argument taken from: -# https://github.com/actions/virtual-environments/issues/1499#issuecomment-689467080 + run: mvn -e -B package --file pom.xml diff --git a/.github/workflows/qualitycheck.yml b/.github/workflows/qualitycheck.yml new file mode 100644 index 0000000..68e23c7 --- /dev/null +++ b/.github/workflows/qualitycheck.yml @@ -0,0 +1,31 @@ +name: QualityCheck +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] + +env: + MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + +jobs: + build: + name: QualityCheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: 8 + distribution: "adopt" + cache: maven + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -e -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=glotaran_glotaran-legacy diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..050505c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.configuration.updateBuildConfiguration": "interactive" +} diff --git a/pom.xml b/pom.xml index 6c2534f..a97aa91 100644 --- a/pom.xml +++ b/pom.xml @@ -33,11 +33,11 @@ - - - glotaran - https://sonarcloud.io - + + + glotaran + https://sonarcloud.io + Glotaran glotaran