-
Notifications
You must be signed in to change notification settings - Fork 78
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 #2867 from LiteFarmOrg/e2e_test_workflow
Move cypress action trigger to manual for testing
- Loading branch information
Showing
1 changed file
with
13 additions
and
12 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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
name: Run cypress happy path test | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- integration | ||
on: | ||
workflow_dispatch: | ||
# pull_request: | ||
# branches: | ||
# - integration | ||
|
||
jobs: | ||
build: | ||
|
@@ -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] | ||
|
@@ -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 | ||
|
@@ -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 }} |