Skip to content

Commit

Permalink
Update cypress.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
marclupanc authored Jan 4, 2025
1 parent 31450e7 commit bc9113c
Showing 1 changed file with 11 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,6 @@ jobs:
node-version: 18.14.0
cache: 'npm'

- name: πŸ“„ Create .env file from GitHub secrets
run: |
echo VITE_FIREBASE_API_KEY=${{ secrets.VITE_FIREBASE_API_KEY }} > .env
echo VITE_FIREBASE_APP_ID=${{ secrets.VITE_FIREBASE_APP_ID }} >> .env
echo VITE_FIREBASE_AUTH_DOMAIN=${{ secrets.VITE_FIREBASE_AUTH_DOMAIN }} >> .env
echo VITE_FIREBASE_MEASUREMENTID=${{ secrets.VITE_FIREBASE_MEASUREMENTID }} >> .env
echo VITE_FIREBASE_MESSAGING_SENDER_ID=${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }} >> .env
echo VITE_FIREBASE_PROJECT_ID=${{ secrets.VITE_FIREBASE_PROJECT_ID }} >> .env
echo VITE_FIREBASE_STORAGE_BUCKET=${{ secrets.VITE_FIREBASE_STORAGE_BUCKET }} >> .env
echo VITE_FIREBASE_VAPID_KEY=${{ secrets.VITE_FIREBASE_VAPID_KEY }} >> .env
- name: πŸ“„ Verify .env file contents
run: cat .env

- name: πŸ’» Run Cypress
uses: cypress-io/github-action@v5
with:
Expand All @@ -44,10 +30,18 @@ jobs:
record: true
parallel: true
env:
# For recording and parallelization to work you must set your CYPRESS_RECORD_KEY
# in GitHub repo β†’ Settings β†’ Secrets β†’ Actions
# Set Firebase secrets directly from GitHub Secrets
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_AUTH_DOMAIN }}
VITE_FIREBASE_MEASUREMENTID: ${{ secrets.VITE_FIREBASE_MEASUREMENTID }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_PROJECT_ID: ${{ secrets.VITE_FIREBASE_PROJECT_ID }}
VITE_FIREBASE_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_STORAGE_BUCKET }}
VITE_FIREBASE_VAPID_KEY: ${{ secrets.VITE_FIREBASE_VAPID_KEY }}
# For recording and parallelization to work, set your CYPRESS_RECORD_KEY
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# pass GitHub token to detect new build vs re-run build
# Pass GitHub token to detect new build vs re-run build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Codecov
Expand Down

0 comments on commit bc9113c

Please sign in to comment.