From 08af05ce6e47604ff4de3d7cdb5c5b0cb269a365 Mon Sep 17 00:00:00 2001 From: pwjmb05 Date: Fri, 22 Nov 2024 17:17:33 -0600 Subject: [PATCH] use test-action to debug test failure --- .github/workflows/test-action.yml | 55 +++++++++++++++---- .../journeys/MinimumCcapFlowJourneyTest.java | 2 +- 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index eb6b4a03b..a0a9d1fc5 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -2,20 +2,20 @@ name: Test action on: workflow_dispatch: -jobs: - debug: - name: Show environment variables - runs-on: ubuntu-latest - steps: - - name: Display env vars - env: - OPENSHIFT_IMAGE_LOCATION: ${{ secrets.OPENSHIFT_IMAGE_LOCATION }} +##jobs: +## debug: +## name: Show environment variables +## runs-on: ubuntu-latest +## steps: +## - name: Display env vars +## env: +## OPENSHIFT_IMAGE_LOCATION: ${{ secrets.OPENSHIFT_IMAGE_LOCATION }} # SERVER_PROD: ${{ secrets.OPENSHIFT_SERVER_PROD }} # TOKEN_PROD: ${{ secrets.OPENSHIFT_TOKEN_PROD }} # NAMESPACE_PROD: ${{ secrets.OPENSHIFT_NAMESPACE_PROD }} # NAMESPACE_NON_PROD: ${{ secrets.OPENSHIFT_TOKEN_NON_PROD }} - run: | - echo ${{ secrets.OPENSHIFT_IMAGE_LOCATION }} +## run: | +## echo ${{ secrets.OPENSHIFT_IMAGE_LOCATION }} # echo ${{secrets.OPENSHIFT_SERVER_PROD}} | sed 's/./& /g' # echo ${{secrets.OPENSHIFT_TOKEN_PROD}} | sed 's/./& /g' # echo ${{secrets.OPENSHIFT_NAMESPACE_PROD}} | sed 's/./& /g' @@ -26,3 +26,38 @@ jobs: # url: 'https://webhook.site/108d58e1-026b-45b4-8b7f-8278824e2dec' # method: 'POST' # data: ${{ secrets.OPENSHIFT_SERVER_PROD }} +##env: +## mnbenefits_env_url: any_string_works_for_github_tests + +jobs: + minimum-flow-journey-test: + name: Run minimum SNAP flow journey test + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - name: Set up ChromeDriver + uses: nanasess/setup-chromedriver@v2.2.2 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'adopt' + java-version: '17' + cache: 'gradle' + - name: Cache Gradle packages + uses: actions/cache@v4 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Test with Gradle + run: ./gradlew minimumFlowJourneyTest + - name: Cleanup Gradle Cache + run: | + rm -f ~/.gradle/caches/modules-2/modules-2.lock + rm -f ~/.gradle/caches/modules-2/gc.properties + \ No newline at end of file diff --git a/src/test/java/org/codeforamerica/shiba/journeys/MinimumCcapFlowJourneyTest.java b/src/test/java/org/codeforamerica/shiba/journeys/MinimumCcapFlowJourneyTest.java index 570573511..d72e14f2c 100644 --- a/src/test/java/org/codeforamerica/shiba/journeys/MinimumCcapFlowJourneyTest.java +++ b/src/test/java/org/codeforamerica/shiba/journeys/MinimumCcapFlowJourneyTest.java @@ -24,7 +24,7 @@ @Tag("minimumFlowJourney") public class MinimumCcapFlowJourneyTest extends JourneyTest { - @Disabled("This test passes on VDIs but fails on GitHub") + //@Disabled("This test passes on VDIs but fails on GitHub") @Test void fullApplicationOnlyCCAP() { when(clock.instant()).thenReturn(