From 72506801314f3a037be139ea153245010f68ab65 Mon Sep 17 00:00:00 2001 From: Henrik Alstad-Kontio Date: Thu, 25 Feb 2021 15:43:40 +0100 Subject: [PATCH 1/4] Update pom.xml --- pom.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pom.xml b/pom.xml index 7a01d24..ae5edf3 100644 --- a/pom.xml +++ b/pom.xml @@ -34,6 +34,9 @@ + drogin_clamav-java + drogin-clamav + https://sonarcloud.io UTF-8 From 2aa6693747c111ff751a0b3d1a2f635ac628c0f1 Mon Sep 17 00:00:00 2001 From: Henrik Alstad-Kontio Date: Thu, 25 Feb 2021 15:44:39 +0100 Subject: [PATCH 2/4] Create build.yml --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..13e35aa --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + build: + name: Build + 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 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Cache SonarCloud packages + uses: actions/cache@v1 + with: + path: ~/.sonar/cache + key: ${{ runner.os }}-sonar + restore-keys: ${{ runner.os }}-sonar + - name: Cache Maven packages + uses: actions/cache@v1 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build and analyze + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar From 5dfb1a7e7eeda3fc5db48a4dc42011c3860e42e4 Mon Sep 17 00:00:00 2001 From: Henrik Alstad-Kontio Date: Thu, 25 Feb 2021 15:49:41 +0100 Subject: [PATCH 3/4] Update build.yml --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13e35aa..02f2aae 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -33,4 +33,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -DskipTests=true From 1b97088a6c4c599d5c0bf133fb4679ca8a8d9822 Mon Sep 17 00:00:00 2001 From: Ben Pennell Date: Fri, 26 Feb 2021 16:23:35 -0500 Subject: [PATCH 4/4] Use clamav-java image as service, reenable tests --- .github/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 02f2aae..9b2bdac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,13 @@ jobs: build: name: Build runs-on: ubuntu-latest + + services: + clamavd: + image: lokori/clamav-java + ports: + - 3310:3310 + steps: - uses: actions/checkout@v2 with: @@ -33,4 +40,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -DskipTests=true + run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar