-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #714 from Atom-Learning/feat/set-up-ci-for-vr-tests
Feat: Add github workflow file for visual regression
- Loading branch information
Showing
3 changed files
with
60 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Visual Regression | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
dsDocumentationUrl: | ||
description: 'URL of environment to run VR tests against. Should include protocol (e.g. https://)' | ||
required: false | ||
default: '' | ||
type: string | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
pull-requests: write | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v2.1.4 | ||
with: | ||
node-version: '20.11' | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Build Library | ||
if: ${{ inputs.dsDocumentationUrl != '' }} | ||
run: yarn build:lib | ||
|
||
- name: Build Documentation | ||
if: ${{ inputs.dsDocumentationUrl != '' }} | ||
run: yarn build:docs | ||
|
||
- name: Start Web Server as a Daemon | ||
if: ${{ inputs.dsDocumentationUrl != '' }} | ||
run: | | ||
yarn start:docs & | ||
disown -h %1 | ||
- name: Install Playwright browsers + dependencies | ||
run: yarn playwright install --with-deps | ||
|
||
- name: Run Visual Regression | ||
run: yarn visual-regression | ||
env: | ||
DS_DOCUMENTATION_URL: '${{ inputs.dsDocumentationUrl }}' | ||
ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,7 @@ | |
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
!.yarn/versions | ||
|
||
playwright-report | ||
test-results |
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