Skip to content

Commit

Permalink
Update cypress_tests.yml
Browse files Browse the repository at this point in the history
Update github actions file
  • Loading branch information
mika-robots committed Sep 14, 2023
1 parent fcd3314 commit ca907b5
Showing 1 changed file with 23 additions and 33 deletions.
56 changes: 23 additions & 33 deletions .github/workflows/cypress_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ jobs:
runs-on: ubuntu-20.04
timeout-minutes: 30
env:
JWT_INVITE_SECRET: ${{secrets.JWT_INVITE_SECRET}}
JWT_RESET_SECRET: ${{secrets.JWT_RESET_SECRET}}
JWT_SCHEDULER_SECRET: ${{secrets.JWT_SCHEDULER_SECRET}}
JWT_SECRET: ${{secrets.JWT_SECRET}}
TEST_USER: ${{secrets.TEST_USER}}
TEST_USER_ID: ${{secrets.TEST_USER_ID}}
JWT_SECRET: This_will_(really)_work
JWT_INVITE_SECRET: Any_arbitrary_string_will_do
JWT_RESET_SECRET: Production_is_secured_with_a_long_random_string
JWT_FARM_SECRET: Here_we_can_use_friendly_explanations
JWT_SCHEDULER_SECRET: Another_token_was_needed_for_the_scheduler
DEV_DATABASE_HOST: localhost
DEV_DATABASE: pg-litefarm
DEV_DATABASE_USER: postgres
Expand Down Expand Up @@ -54,64 +53,55 @@ jobs:
env:
PORT: 5000

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

- name: Run and test app
version: latest
- name: Run Webapp
working-directory: packages/webapp
run: |
pnpm install --config.auto-install-peers=true --no-frozen-lockfile --force
pnpm dev &
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]
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-timeout: 120
headed: true
browser: chrome
record: true
parallel: true
group: "UI - Chrome"
spec: cypress/e2e/happyPath.spec.js


- name: Run E2E test
continue-on-error: true
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"
USER: 0
CYPRESS_RECORD_KEY: "c0685451-2bc1-404e-884e-bfd4699520b2"
CYPRESS_USER: 0
uses: cypress-io/[email protected]
with:
working-directory: packages/end-to-end
wait-on: "http://localhost:3000"
wait-on-timeout: 120
headed: true
browser: chrome
record: true
parallel: true
group: "UI - Chrome"


- name: Archive backend logs
uses: actions/upload-artifact@v3
with:
name: logs
path: packages/api/logs

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

- name: Archive code coverage results
uses: actions/upload-artifact@v3
continue-on-error: true
with:
name: code-coverage-report
working-directory: packages/webapp
Expand Down

0 comments on commit ca907b5

Please sign in to comment.