Skip to content

Commit

Permalink
Merge pull request #765 from wearefrank/cypressSupportPort80
Browse files Browse the repository at this point in the history
Cypress support "port 80"
  • Loading branch information
philipsens authored Nov 1, 2024
2 parents a39aa18 + a33d83b commit 216cc7b
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/testing.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
pull_request:
workflow_dispatch:
inputs:
useRealFrontend:
description: If true, test the frontend inside the backend
type: boolean
default: false
required: true
mergeMasterToBranch:
description: If true, the checkout-out backend is merged with the backend master
type: boolean
Expand Down Expand Up @@ -87,14 +92,17 @@ jobs:

- name: Run linter
run: pnpm run lint
if: ${{ github.event.inputs.useRealFrontend != 'true' }}
working-directory: ladybug-frontend

- name: Build project
run: pnpm run build
if: ${{ github.event.inputs.useRealFrontend != 'true' }}
working-directory: ladybug-frontend

- name: Run unit tests
run: pnpm run test-headless
if: ${{ github.event.inputs.useRealFrontend != 'true' }}
working-directory: ladybug-frontend
continue-on-error: false

Expand Down Expand Up @@ -175,27 +183,25 @@ jobs:
run: pnpm run startServer &
working-directory: ladybug-frontend

- name: Run cypress with chrome browser
- name: Run cypress with chrome browser (bypass ladybug-frontend within backend)
uses: cypress-io/[email protected]
if: ${{ github.event.inputs.useRealFrontend != 'true' }}
with:
working-directory: ladybug-frontend
start: |
pnpm run startCicd
wait-on: "http://0.0.0.0:8090, http://0.0.0.0:4200"
wait-on-timeout: 1000
browser: chrome
# - name: Run cypress with firefox browser
# if: ${{ github.event.inputs.useRealFrontend != 'true' }}
# uses: cypress-io/[email protected]
# with:
# working-directory: ladybug-frontend
# start: |
# pnpm run startCicd
# wait-on: 'http://localhost:8090, http://localhost:4200'
# wait-on-timeout: 240
# browser: firefox
# config: screenshotsFolder=cypress/firefox/screenshots,videosFolder=cypress/firefox/videos

- name: Run cypress with chrome browser (production frontend that is included in backend)
uses: cypress-io/[email protected]
if: ${{ github.event.inputs.useRealFrontend == 'true' }}
with:
working-directory: ladybug-frontend
wait-on: "http://0.0.0.0:8090"
wait-on-timeout: 1000
config: baseUrl=http://localhost:8090/ladybug
browser: chrome
- name: Show files
run: tree -d -L 5 .
if: always()
Expand Down

0 comments on commit 216cc7b

Please sign in to comment.