Refine job name for Applitools #3739
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
- name: Create production build | |
run: yarn build | |
working-directory: aries-site | |
# Tests are only run on headless Chrome | |
- name: Run e2e tests on Chrome | |
run: yarn test:ci | |
working-directory: aries-site | |
# Don't run snapshots on forked repos which don't | |
# have access to APPLITOOLS_API_KEY | |
- name: Run Applitools tests | |
if: ${{ github.event.pull_request.head.repo.full_name == 'grommet/hpe-design-system' }} | |
run: yarn test:applitools | |
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/curl@v1.1.1 | |
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 }} |