From 0255e5f8ecf3468ab05d211280b4620e640a3331 Mon Sep 17 00:00:00 2001 From: Adam Lerman Date: Mon, 21 Oct 2024 11:47:50 +0000 Subject: [PATCH] Test conditionals --- .github/workflows/tests.yaml | 33 +++++---------------------------- 1 file changed, 5 insertions(+), 28 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2da6b7a..2ac8a1b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -9,32 +9,9 @@ on: pull_request: paths-ignore: ['*.md', 'CODEOWNERS', 'LICENSE'] +env: + RUN_MAVEN_TESTS: "false" + jobs: - # Runs the pom sorter and code formatter to ensure that the code - # is formatted and poms are sorted according to project rules. This - # will fail if the formatter makes any changes. - check-code-formatting: - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v1 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - uses: actions/cache@v1 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-format-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven-format- - ${{ runner.os }}-maven- - - name: Format code - run: | - mvn -s $GITHUB_WORKSPACE/.github/workflows/settings.xml -V -B -e clean formatter:format sortpom:sort -Pautoformat - git status - git diff-index --quiet HEAD || (echo "Error! There are modified files after formatting." && false) - env: - MAVEN_OPTS: "-Dhttps.protocols=TLSv1.2 -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Djava.awt.headless=true" - USER_NAME: ${{ secrets.USER_NAME }} - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + call-reusable-workflow: + uses: nationalsecurityagency/datawave/.github/workflows/microservice-maven-tests.yaml@conditional-run-maven-tests \ No newline at end of file