Skip to content

Commit

Permalink
ci: cypress install command
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Dec 21, 2022
1 parent 8976cb9 commit b94e88a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/reusable-web-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ jobs:
- name: Wait on WEB
run: wait-on --timeout=120000 http://localhost:4200

# run cypress install only when cache was not hit
- name: Cypress install
if: steps.cache-cypress-binary.outputs.cache-hit != 'true'
working-directory: apps/web
run: pnpm cypress install

- name: Cypress run e2e
uses: cypress-io/github-action@v4
env:
Expand All @@ -144,7 +150,7 @@ jobs:
browser: chrome
record: true
parallel: true
install: ${{steps.cache-cypress-binary.outputs.cache-hit != 'true'}}
install: false
config-file: cypress.config.ts

- uses: actions/upload-artifact@v1
Expand Down Expand Up @@ -213,6 +219,12 @@ jobs:
- name: Build
run: CI='' pnpm build:web

# run cypress install only when cache was not hit
- name: Cypress install
if: steps.cache-cypress-binary.outputs.cache-hit != 'true'
working-directory: apps/web
run: pnpm cypress install

- name: Run Component tests 🧪
uses: cypress-io/github-action@v5
env:
Expand All @@ -223,7 +235,7 @@ jobs:
with:
browser: chrome
working-directory: apps/web
install: ${{steps.cache-cypress-binary.outputs.cache-hit != 'true'}}
install: false
component: true

- uses: actions/upload-artifact@v1
Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"start:docker": "pnpm build && pnpm start:static:build",
"start:dev": "pnpm start",
"cypress:run": "cross-env NODE_ENV=test cypress run",
"cypress:install": "cypress install",
"cypress:open": "cross-env NODE_ENV=test cypress open",
"cypress:run:components": "cross-env NODE_OPTIONS=--max_old_space_size=4096 NODE_ENV=test cypress run --component",
"start:api": "cd ../../ && pnpm start:api:test",
Expand Down

0 comments on commit b94e88a

Please sign in to comment.