From aec249f873b73e350a424b449c437c26c7edb2ca Mon Sep 17 00:00:00 2001 From: Sree P Date: Fri, 23 Feb 2024 10:05:41 -0800 Subject: [PATCH 1/2] Adding percy workflow --- .github/workflows/run-percy.yaml | 42 ++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/run-percy.yaml diff --git a/.github/workflows/run-percy.yaml b/.github/workflows/run-percy.yaml new file mode 100644 index 000000000..cc3bd73d2 --- /dev/null +++ b/.github/workflows/run-percy.yaml @@ -0,0 +1,42 @@ +name: Run Percy visual diff testing + +on: + workflow_dispatch: + inputs: { } + +jobs: + percy: + name: Run Percy + runs-on: ubuntu-latest + services: + postgres: + image: postgres + env: + POSTGRES_USER: il-gcc-test + POSTGRES_PASSWORD: postgres + POSTGRES_DB: il-gcc-test + options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 + ports: + - 5432:5432 + steps: + - uses: actions/checkout@v4 + - name: Set up ChromeDriver + uses: nanasess/setup-chromedriver@v2.2.1 + - name: Set up JDK + uses: actions/setup-java@v4.0.0 + with: + distribution: 'adopt' + java-version: '17' + cache: 'gradle' + - name: Use Node.js 14.x + uses: actions/setup-node@v1 + with: + node-version: '14.x' + - name: Install percy from npm + run: npm install -g @percy/cli + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Run journey test and send to Percy + run: npx percy exec -- ./gradlew test + env: + PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} From 1cb1e73d706c59049e5658e594bb250721d52da2 Mon Sep 17 00:00:00 2001 From: Sree P Date: Fri, 23 Feb 2024 11:59:21 -0800 Subject: [PATCH 2/2] Specifying test to run --- .github/workflows/run-percy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-percy.yaml b/.github/workflows/run-percy.yaml index cc3bd73d2..ff9e320cb 100644 --- a/.github/workflows/run-percy.yaml +++ b/.github/workflows/run-percy.yaml @@ -37,6 +37,6 @@ jobs: - name: Grant execute permission for gradlew run: chmod +x gradlew - name: Run journey test and send to Percy - run: npx percy exec -- ./gradlew test + run: npx percy exec -- ./gradlew test --tests org.ilgcc.app.journeys.GccFlowJourneyTest.fullGccFlow env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}