Skip to content

Commit

Permalink
Move cypress action trigger to manual for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mika-robots committed Sep 13, 2023
1 parent 86b66b9 commit f7c7bc1
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/cypress_tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Run cypress happy path test

on:
pull_request:
branches:
- integration
on:
workflow_dispatch:
# pull_request:
# branches:
# - integration

jobs:
build:
Expand All @@ -24,7 +25,7 @@ jobs:
VITE_GOOGLE_MAPS_API_KEY: ${{secrets.VITE_GOOGLE_MAPS_API_KEY}}
VITE_WEATHER_API_KEY: ${{secrets.VITE_WEATHER_API_KEY}}
NODE_ENV: development

strategy:
matrix:
node-version: [16.15.0]
Expand Down Expand Up @@ -52,39 +53,39 @@ jobs:
npm run start &
env:
PORT: 5000

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Run and test app
env:
env:
VITE_WEATHER_API_KEY: ${{secrets.VITE_WEATHER_API_KEY}}
VITE_ENV: development
VITE_GOOGLE_OAUTH_CLIENT_ID: ${{secrets.VITE_GOOGLE_OAUTH_CLIENT_ID}}
VITE_DO_BUCKET_NAME: litefarm
NODE_ENV: development
VITE_API_URL: http://localhost:5000
CYPRESS_RECORD_KEY: "2630f414-4914-48b0-907d-aa3a9cc6a30b"
uses: cypress-io/[email protected]
uses: cypress-io/[email protected]
with:
working-directory: packages/webapp
install-command: pnpm install --config.auto-install-peers=true --no-frozen-lockfile --force
install: true
start: pnpm dev
wait-on: 'http://localhost:3000'
wait-on: "http://localhost:3000"
wait-on-timeout: 120
headed: true
browser: chrome
record: true
parallel: true
group: 'UI - Chrome'
group: "UI - Chrome"
spec: cypress/e2e/happyPath.spec.js

- name: set code coverage badge
run: npx -p check-code-coverage update-badge --from '${GITHUB_WORKSPACE}/packages/webapp/coverage/coverage-summary.json'
env:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Archive code coverage results
Expand All @@ -99,6 +100,6 @@ jobs:
continue-on-error: true
working-directory: packages/webapp
run: npx set-gh-status
env:
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GH_SHA: ${{ github.event.after }}

0 comments on commit f7c7bc1

Please sign in to comment.