-
Notifications
You must be signed in to change notification settings - Fork 24
48 lines (44 loc) · 1.68 KB
/
testcafe.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Run e2e tests
on:
pull_request:
branches:
- master
env:
# Token can be found in Applitools project settings
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
APPLITOOLS_BATCH_ID: ${{github.event.pull_request.head.sha}}
APPLITOOLS_DONT_CLOSE_BATCHES: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Install latest dependencies
run: yarn upgrade
working-directory: aries-site
- name: Log Git Repository
run: echo "$GITHUB_REPOSITORY"
# Tests are only run on headless Chrome
- name: Build and run e2e tests on Chrome
if: ${{ github.event.pull_request.head.repo.full_name == 'grommet/hpe-design-system' }}
run: yarn test:ci
working-directory: aries-site
# Forked repo does not have access to APPLITOOLS_API_KEY
# Just run e2e tests but not snapshots
- name: Build and run e2e tests on Chrome, forked repo
if: ${{ github.event.pull_request.head.repo.full_name != 'grommet/hpe-design-system' }}
run: yarn test:fork
working-directory: aries-site
batch-completion-notification:
needs: build-and-test
if: ${{ github.event.pull_request.head.repo.full_name == 'grommet/hpe-design-system' }}
runs-on: ubuntu-latest
steps:
- name: Update Applitools batch status
uses: wei/[email protected]
with:
args: -d "" -X POST https://eyesapi.applitools.com/api/externals/github/servers/github.com/commit/${{ env.APPLITOOLS_BATCH_ID }}/complete?apiKey=${{ secrets.APPLITOOLS_API_KEY }}