Skip to content

Commit

Permalink
ci(percy): Separate calltaker snapshots to a separate job.
Browse files Browse the repository at this point in the history
  • Loading branch information
binh-dam-ibigroup committed Sep 14, 2023
1 parent ddf4f0f commit d7f8c8c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/percy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
jobs:
run-pixel-tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -37,6 +36,23 @@ jobs:
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_OTP2 }}
OTP_RR_UI_MODE: normal
run-pixel-tests-calltaker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# This allows us to work with the repository during the lint step
fetch-depth: 2
- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Install npm packages using cache
uses: bahmutov/npm-install@v1
- name: Download OTP2 config file
run: curl $PERCY_OTP2_CONFIG_URL --output /tmp/otp2config.yml
env:
PERCY_OTP2_CONFIG_URL: ${{ secrets.PERCY_MOCK_OTP2_GEOCODER_CONFIG }}
- name: Build OTP-RR Calltaker
# Calltaker has a separate config file, so another build should be produced.
run: yarn build
Expand Down
2 changes: 1 addition & 1 deletion percy/percy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const percySnapshot = require('@percy/puppeteer')

const { OTP_RR_UI_MODE } = process.env

const MOCK_SERVER_PORT = OTP_RR_UI_MODE === 'calltaker' ? 5487 : 5486
const MOCK_SERVER_PORT = 5486

// Puppeteer can take a long time to load, especially in some ci environments
jest.setTimeout(600000)
Expand Down

0 comments on commit d7f8c8c

Please sign in to comment.