Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 2 additions & 90 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion acceptance-tests/acceptance-tests-dogfood/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</parent>

<artifactId>acceptance-tests-dogfood</artifactId>
<name>JCT dogfooding acceptance tests</name>
<name>JCT-within-JCT acceptance tests (dogfood)</name>
<description>Acceptance test that tests JCT can compile itself.</description>

<dependencies>
Expand Down
11 changes: 8 additions & 3 deletions acceptance-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@
<description>Acceptance test components.</description>

<modules>
<!-- Custom code proof-of-concept tests -->
<module>acceptance-tests-serviceloader</module>
<module>acceptance-tests-serviceloader-jpms</module>

<!-- Third-party library tests -->
<module>acceptance-tests-avaje-inject</module>
<module>acceptance-tests-avaje-jsonb</module>
<module>acceptance-tests-checkerframework</module>
<module>acceptance-tests-dagger</module>
<module>acceptance-tests-dogfood</module>
<module>acceptance-tests-error-prone</module>
<module>acceptance-tests-google-auto-factory</module>
<module>acceptance-tests-google-auto-service</module>
Expand All @@ -46,9 +50,10 @@
<module>acceptance-tests-lombok</module>
<module>acceptance-tests-mapstruct</module>
<module>acceptance-tests-micronaut</module>
<module>acceptance-tests-serviceloader</module>
<module>acceptance-tests-serviceloader-jpms</module>
<module>acceptance-tests-spring</module>

<!-- Dogfood tests -->
<module>acceptance-tests-dogfood</module>
</modules>

<properties>
Expand Down
40 changes: 0 additions & 40 deletions java-compiler-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,45 +165,5 @@
</plugins>
</build>
</profile>

<profile>
<id>mutation</id>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>

<configuration>
<!-- Don't run normal tests alongside pitest -->
<skip>true</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>

<configuration>
<!-- Don't run normal tests alongside pitest -->
<skip>true</skip>
</configuration>
</plugin>


<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>

<configuration>
<excludedGroups>
<excludedGroup>no-mutation</excludedGroup>
</excludedGroups>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
21 changes: 0 additions & 21 deletions java-compiler-testing/security-suppressions.xml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
Loading