diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 00000000..827a7f90 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,41 @@ +name: Java +on: + push: + branches: [master] + pull_request: + branches: [master] + types: [opened, synchronize] + +jobs: + OpenJDK-11-with-SonarQube: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + # Disabling shallow clone is recommended for improving relevancy of reporting + fetch-depth: 0 + - name: Set up JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Build with Maven + run: mvn -B clean verify sonar:sonar -Dsonar.projectKey=dependency-check_dependency-check-sonar-plugin -Dsonar.login=$SONAR_TOKEN + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + OpenJDK8: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + # Disabling shallow clone is recommended for improving relevancy of reporting + fetch-depth: 0 + - name: Set up JDK 8 + uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Build with Maven + run: mvn -B clean verify + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cd3892b6..00000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -language: java -git: - depth: false -addons: - sonarcloud: - organization: dependency-check - token: - secure: DoKbTc6euo/1GBD6u2pVzOhK4v9gf8ZJacsQaSU4zbnL5uYTknTBO+x+8eNGBLtoLHx28Rk5HPrZDK4ADZch1Zzy92qxV0A8/m7zJcZQQlK2Mb1TohOtCEA7ACnf53xUAH+XpSdAfgKLLk7gl8Q2B3rOaDG5uxPciUg5jqfuWV4= - -# only build commits/PRs targeted to the master branch -# this avoids duplicate builds for push + PR -branches: - only: - - master - -jobs: - include: - - name: OpenJDK 11 with SonarQube - language: java - jdk: openjdk11 - script: - - mvn clean verify sonar:sonar -Dsonar.projectKey=dependency-check_dependency-check-sonar-plugin - - name: OpenJDK 8 - language: java - jdk: openjdk8 - script: - - mvn clean verify