Skip to content

Commit

Permalink
feat: wip visual test
Browse files Browse the repository at this point in the history
  • Loading branch information
ericjansenrpm committed Aug 1, 2024
1 parent a531b21 commit 374920e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
29 changes: 11 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,40 +29,33 @@ jobs:
node-version: '18.x'
- name: Install deps
run: npm ci
- name: Run linter
run: npm run lint
- name: Run tests
run: npm run test
- name: Run storybook build
run: npm run build-storybook
- name: Run linter
run: npm run lint

visual-test:
name: Visual testing with baseline comparison
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v3
# - name: Setup node
# uses: actions/setup-node@v3
# with:
# node-version: '18.x'
# - name: Install deps
# run: npm ci
# - name: Start dev server
# run: npm run start &
# - name: Check the deployed service URL
# uses: jtalk/url-health-check-action@v3
# with:
# url: http://localhost:3000/test
# max-attempts: 5
# retry-delay: 10s
# retry-all: true
- uses: cypress-io/github-action@v6
with:
browser: chrome
browser: electron
headed: true
start: npm start
project: ./test/functional
- name: upload diffs
- name: upload diffs
if: failure()
uses: actions/upload-artifact@v3
with:
name: cypress-diffs-screenshots
path: test/functional/cypress-image-diff-screenshots

build-and-deploy:
name: Build, Deploy to GitHub pages, Release npm package
needs: [test, visual-test]
Expand Down
4 changes: 4 additions & 0 deletions test/functional/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@ module.exports = defineConfig({
chromeWebSecurity: false,
experimentalModifyObstructiveThirdPartyCode: true,
responseTimeout: 60000
},
retries: {
runMode: 3,
openMode: 2
}
});

0 comments on commit 374920e

Please sign in to comment.