From e92ce427801de8b4821769808d8f5bc759dd29a0 Mon Sep 17 00:00:00 2001 From: Ashley Scopes <73482956+ascopes@users.noreply.github.com> Date: Sat, 18 Feb 2023 10:44:45 +0000 Subject: [PATCH] Remove unused plugins - Remove pitest as we do not use the results anywhere. - Remove dependency-check plugin as we use Sonatype Lift already which covers the same thing. - Remove dependency-check and mutation-test steps from CI. Closes #343. --- .github/workflows/build.yml | 92 +------------------ .../acceptance-tests-dogfood/pom.xml | 2 +- acceptance-tests/pom.xml | 11 ++- java-compiler-testing/pom.xml | 40 -------- .../security-suppressions.xml | 21 ----- .../jct/tests/helpers/DoNotMutationTest.java | 35 ------- ...BasicLegacyCompilationIntegrationTest.java | 2 - ...BasicModuleCompilationIntegrationTest.java | 2 - ...MultiModuleCompilationIntegrationTest.java | 2 - .../LoggingFileManagerProxyTest.java | 2 - pom.xml | 83 ----------------- security-suppressions.xml | 21 ----- 12 files changed, 11 insertions(+), 302 deletions(-) delete mode 100644 java-compiler-testing/security-suppressions.xml delete mode 100644 java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/DoNotMutationTest.java delete mode 100644 security-suppressions.xml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3b5ec800..7aada7227 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,60 +134,12 @@ jobs: path: reports-${{ matrix.java-version }}-${{ matrix.os-name }}.tar.xz retention-days: 30 - mutation-tests: - name: Run mutation tests - runs-on: ubuntu-22.04 - if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' - - steps: - - name: Checkout repository - uses: actions/checkout@v3.3.0 - with: - fetch-depth: 2 - - - name: Initialize Java - uses: actions/setup-java@v3.10.0 - with: - distribution: 'zulu' - java-version: 17 - cache: 'maven' - - - name: Run mutation tests - shell: bash - # Do not run on multiple threads, the plugin does not support this properly. - run: ./mvnw -B -U -am -pl java-compiler-testing -P mutation -Dcheckstyle.skip=true -Dlicense.skip=true test - - # Compress first so that the collection job later takes far less time (order of a few minutes - # or so). GitHub does not compress these until after the workflow finishes, meaning when - # we unstash them to produce the coverage reports, it will make an HTTP call for every single - # file. This can take several minutes and is somewhat painful to have to wait for. - - name: Compress mutation test reports into tarball - if: always() - shell: bash - run: |- - # Allow ** globbing - set +f -x - # Allow globs to not match anything without causing errors. - shopt -s nullglob - # XZ with max compression, more efficient than using GZip. - XZ_OPT=-9 tar -Jcvf reports-mutation-tests.tar.xz **/target/pit-reports/pit-reports/** - - - name: Stash reports tarball - uses: actions/upload-artifact@v3.1.2 - if: always() - with: - name: reports-mutation-tests - if-no-files-found: error - path: reports-mutation-tests.tar.xz - retention-days: 30 - publish-test-reports: name: Publish test reports runs-on: ubuntu-22.04 if: always() needs: - build - - mutation-tests permissions: checks: write @@ -251,8 +203,8 @@ jobs: #./codecov -c -F unit -v #./codecov -c -F integration -v - formatting: - name: Check formatting and licenses + linting: + name: Linting runs-on: ubuntu-22.04 steps: @@ -279,46 +231,6 @@ jobs: -Dmaven.test.skip verify - dependency-check: - name: Run dependency check - runs-on: ubuntu-22.04 - - steps: - - name: Checkout repository - uses: actions/checkout@v3.3.0 - with: - fetch-depth: 2 - - - name: Initialize Java - uses: actions/setup-java@v3.10.0 - with: - distribution: 'zulu' - java-version: 17 - cache: 'maven' - - - name: Run checks - shell: bash - run: >- - ./mvnw - -B -U - -P dependency-check - -DskipTests=true - -Dcheckstyle.skip=true - -Dlicense.skip=true - -Dmaven.main.skip - -Dmaven.jar.skip - -Dmaven.resources.skip - -Dmaven.test.skip - verify - - - name: Archive Dependency Scan reports - uses: actions/upload-artifact@v3.1.2 - if: always() - with: - name: dependency-scan-report - path: '**/target/dependency-check-report.html' - retention-days: 30 - generate-documentation: name: Generate documentation runs-on: ubuntu-22.04 diff --git a/acceptance-tests/acceptance-tests-dogfood/pom.xml b/acceptance-tests/acceptance-tests-dogfood/pom.xml index 4b75d5bbc..b87ceda99 100644 --- a/acceptance-tests/acceptance-tests-dogfood/pom.xml +++ b/acceptance-tests/acceptance-tests-dogfood/pom.xml @@ -27,7 +27,7 @@ acceptance-tests-dogfood - JCT dogfooding acceptance tests + JCT-within-JCT acceptance tests (dogfood) Acceptance test that tests JCT can compile itself. diff --git a/acceptance-tests/pom.xml b/acceptance-tests/pom.xml index 3edf413db..0b2375ded 100644 --- a/acceptance-tests/pom.xml +++ b/acceptance-tests/pom.xml @@ -33,11 +33,15 @@ Acceptance test components. + + acceptance-tests-serviceloader + acceptance-tests-serviceloader-jpms + + acceptance-tests-avaje-inject acceptance-tests-avaje-jsonb acceptance-tests-checkerframework acceptance-tests-dagger - acceptance-tests-dogfood acceptance-tests-error-prone acceptance-tests-google-auto-factory acceptance-tests-google-auto-service @@ -46,9 +50,10 @@ acceptance-tests-lombok acceptance-tests-mapstruct acceptance-tests-micronaut - acceptance-tests-serviceloader - acceptance-tests-serviceloader-jpms acceptance-tests-spring + + + acceptance-tests-dogfood diff --git a/java-compiler-testing/pom.xml b/java-compiler-testing/pom.xml index 4ea5c2656..c5ceb0071 100644 --- a/java-compiler-testing/pom.xml +++ b/java-compiler-testing/pom.xml @@ -165,45 +165,5 @@ - - - mutation - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - true - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - - true - - - - - - org.pitest - pitest-maven - - - - no-mutation - - - - - - diff --git a/java-compiler-testing/security-suppressions.xml b/java-compiler-testing/security-suppressions.xml deleted file mode 100644 index 908715a24..000000000 --- a/java-compiler-testing/security-suppressions.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - diff --git a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/DoNotMutationTest.java b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/DoNotMutationTest.java deleted file mode 100644 index 26cf0e2f7..000000000 --- a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/helpers/DoNotMutationTest.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2022 - 2023, the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.github.ascopes.jct.tests.helpers; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Inherited; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; -import org.junit.jupiter.api.Tag; - -/** - * Marks a test so that it will not be mutation tested. - * - * @author Ashley Scopes - */ -@Inherited -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.METHOD, ElementType.ANNOTATION_TYPE}) -@Tag("no-mutation") -public @interface DoNotMutationTest { -} diff --git a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicLegacyCompilationIntegrationTest.java b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicLegacyCompilationIntegrationTest.java index 5462f40f5..4da4a6d90 100644 --- a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicLegacyCompilationIntegrationTest.java +++ b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicLegacyCompilationIntegrationTest.java @@ -19,7 +19,6 @@ import io.github.ascopes.jct.compilers.JctCompiler; import io.github.ascopes.jct.junit.JavacCompilerTest; -import io.github.ascopes.jct.tests.helpers.DoNotMutationTest; import io.github.ascopes.jct.workspaces.PathStrategy; import io.github.ascopes.jct.workspaces.Workspaces; import javax.tools.StandardLocation; @@ -31,7 +30,6 @@ * @author Ashley Scopes */ @DisplayName("Basic legacy compilation integration tests") -@DoNotMutationTest class BasicLegacyCompilationIntegrationTest { @DisplayName("I can compile a 'Hello, World!' program using a RAM directory") diff --git a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicModuleCompilationIntegrationTest.java b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicModuleCompilationIntegrationTest.java index a95037e97..6df9c49eb 100644 --- a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicModuleCompilationIntegrationTest.java +++ b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicModuleCompilationIntegrationTest.java @@ -19,7 +19,6 @@ import io.github.ascopes.jct.compilers.JctCompiler; import io.github.ascopes.jct.junit.JavacCompilerTest; -import io.github.ascopes.jct.tests.helpers.DoNotMutationTest; import io.github.ascopes.jct.workspaces.PathStrategy; import io.github.ascopes.jct.workspaces.Workspaces; import org.junit.jupiter.api.DisplayName; @@ -30,7 +29,6 @@ * @author Ashley Scopes */ @DisplayName("Basic module compilation integration tests") -@DoNotMutationTest class BasicModuleCompilationIntegrationTest { @DisplayName("I can compile a 'Hello, World!' module program using a RAM disk") diff --git a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicMultiModuleCompilationIntegrationTest.java b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicMultiModuleCompilationIntegrationTest.java index 0d8d92983..2f0d939ab 100644 --- a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicMultiModuleCompilationIntegrationTest.java +++ b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/integration/BasicMultiModuleCompilationIntegrationTest.java @@ -19,7 +19,6 @@ import io.github.ascopes.jct.compilers.JctCompiler; import io.github.ascopes.jct.junit.JavacCompilerTest; -import io.github.ascopes.jct.tests.helpers.DoNotMutationTest; import io.github.ascopes.jct.workspaces.PathStrategy; import io.github.ascopes.jct.workspaces.Workspaces; import org.junit.jupiter.api.DisplayName; @@ -30,7 +29,6 @@ * @author Ashley Scopes */ @DisplayName("Basic multi-module compilation integration tests") -@DoNotMutationTest class BasicMultiModuleCompilationIntegrationTest { @DisplayName("I can compile a single module using multi-module layout using a RAM disk") diff --git a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/unit/filemanagers/LoggingFileManagerProxyTest.java b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/unit/filemanagers/LoggingFileManagerProxyTest.java index e7c22829e..16aef1087 100644 --- a/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/unit/filemanagers/LoggingFileManagerProxyTest.java +++ b/java-compiler-testing/src/test/java/io/github/ascopes/jct/tests/unit/filemanagers/LoggingFileManagerProxyTest.java @@ -34,7 +34,6 @@ import io.github.ascopes.jct.filemanagers.JctFileManager; import io.github.ascopes.jct.filemanagers.LoggingFileManagerProxy; -import io.github.ascopes.jct.tests.helpers.DoNotMutationTest; import io.github.ascopes.jct.tests.helpers.Slf4jLoggerFake; import io.github.ascopes.jct.utils.LoomPolyfill; import java.lang.reflect.Array; @@ -73,7 +72,6 @@ * @author Ashley Scopes */ @DisplayName("LoggingFileManagerProxy tests") -@DoNotMutationTest @ExtendWith(MockitoExtension.class) @Isolated("Messes with proxies and side effects") @MockitoSettings(strictness = Strictness.LENIENT) diff --git a/pom.xml b/pom.xml index 8ce705bfd..196869670 100644 --- a/pom.xml +++ b/pom.xml @@ -106,7 +106,6 @@ 2.0.6 - 8.0.2 2.1.0 0.8.8 4.1 @@ -123,12 +122,10 @@ 3.2.1 3.0.0-M8 1.6.13 - 1.11.0 10.7.0 1.1.0 - 1.1.2 true @@ -564,74 +561,6 @@ - - - org.owasp - dependency-check-maven - ${dependency-check.version} - - - true - - html - junit - - - ${skip-dependency-scan} - true - ${project.basedir}/security-suppressions.xml - - - - - dependency-check - verify - - check - - - - - - - - org.pitest - pitest-maven - ${pitest-maven.version} - - - - org.pitest - pitest-junit5-plugin - ${pitest-junit5-plugin.version} - - - - - true - false - - +auto_threads - +export - - false - true - 16 - false - true - - - - - mutation-test - test - - mutationCoverage - report - - - - @@ -719,18 +648,6 @@ - - dependency-check - - - - org.owasp - dependency-check-maven - - - - - releases diff --git a/security-suppressions.xml b/security-suppressions.xml deleted file mode 100644 index 908715a24..000000000 --- a/security-suppressions.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - -