Merge pull request #880 from Huzaif-Ahmed/contriupdate #218
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
name: Cypress Tests | |
env: | |
VITE_APP_FIREBASE_API_KEY: AIzaSyASOtRR71J484CcXhvs3BBZByhIII8lNuU | |
VITE_APP_AUTH_DOMAIN: codelabz-966e5.firebaseapp.com | |
VITE_APP_FIREBASE_PROJECT_ID: codelabz-966e5 | |
VITE_APP_FIREBASE_MESSAGING_SENDER_ID: 1004651538159 | |
VITE_APP_FIREBASE_APP_ID: 1:1004651538159:web:9801af1b5c45c01aec9d1a | |
VITE_APP_FIREBASE_MEASUREMENTID: G-N0P8Q281YB | |
VITE_APP_DATABASE_URL: https://codelabz-966e5-default-rtdb.asia-southeast1.firebasedatabase.app | |
VITE_APP_FIREBASE_FCM_VAPID_KEY: BBcdjIEOfdgGVCbK2-vpE_aDfNlJr5ffQ6UegCzH-QjMhpuEpCs6Zw7o1DFm9cYGCDF7ri0W4YwsyubL7owjhIQ | |
VITE_APP_USE_EMULATOR: true | |
CYPRESS_PROJECT_ID: gjfouu | |
SKIP_PREFLIGHT_CHECK: true | |
CI: false | |
on: [push, pull_request] | |
jobs: | |
cypress-run: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 14 | |
- name: Make envfile | |
uses: SpicyPizza/create-envfile@v1.3 | |
with: | |
envkey_VITE_APP_FIREBASE_API_KEY: AIzaSyASOtRR71J484CcXhvs3BBZByhIII8lNuU | |
envkey_VITE_APP_AUTH_DOMAIN: codelabz-966e5.firebaseapp.com | |
envkey_VITE_APP_FIREBASE_PROJECT_ID: codelabz-966e5 | |
envkey_VITE_APP_FIREBASE_MESSAGING_SENDER_ID: 1004651538159 | |
envkey_VITE_APP_FIREBASE_APP_ID: 1:1004651538159:web:9801af1b5c45c01aec9d1a | |
envkey_VITE_APP_FIREBASE_MEASUREMENTID: G-N0P8Q281YB | |
envkey_VITE_APP_DATABASE_URL: https://codelabz-966e5-default-rtdb.asia-southeast1.firebasedatabase.app | |
envkey_VITE_APP_FIREBASE_FCM_VAPID_KEY: BBcdjIEOfdgGVCbK2-vpE_aDfNlJr5ffQ6UegCzH-QjMhpuEpCs6Zw7o1DFm9cYGCDF7ri0W4YwsyubL7owjhIQ | |
envkey_VITE_APP_USE_EMULATOR: true | |
envkey_CYPRESS_PROJECT_ID: gjfouu | |
envkey_SKIP_PREFLIGHT_CHECK: true | |
envkey_CI: false | |
- run: cd functions && mkdir private && touch private/cl-dev-pk.json | |
- name: create-json | |
id: create-json | |
uses: jsdaniell/create-json@v1.2.2 | |
with: | |
name: "cl-dev-pk.json" | |
json: '{ "type": "service_account", "project_id": "codelabz-966e5", "private_key_id": "29854a2aca206a19ea1f15ce4ccfad28d37b01c1", "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDDa4KUTXeBR1Cf\nvBCCSlqa1qALPJBkSHpb6qXJzDS2Mf9tMw8doCbWdKCuZT4oSSCVRbtOTuOLmVcd\nuWW6OADURTFRzxQV1HC5ME94HtslT7mj4qraxNXrIu4C1AL+oNqWsrH2FCW4RCad\nStUrLNQjmgw9YPZh/TMfn1fnWfBgU9iPzMlHhjyZDXsgP9XBKS4El4S6/kyhxyPo\nXSOuyeqPH09RhCLdkV+CNsc3aKygBfmzgWmMkn+nKeIIqgM3xKVz7EcH7eGPAsFc\nwqNx+lMlLLjJfOvIVOZ5cihurnDRHSUfR3KZ+4XByfZJuErzQRo0eukksy0KdphS\n33xqwJgvAgMBAAECggEAJ+X45JeGaTYqv1ox0rAknI1qYrDsWBU2KjMXw0I2luZR\nXLW6hdVvaISqU8Dm9mmrxd5VVjEkIxndH/v8yY7qmGxCHA5X7vcPRrgW2ZMPMih7\nYfsC4CSk+luI1bn8nIkx5+e3DuNhKiR778xaBnUiINywWA3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uom\n4Y8i9StXnxhxMprkUn8vBpw=\n-----END PRIVATE KEY-----\n","client_email": "firebase-adminsdk-h37uk@codelabz-966e5.iam.gserviceaccount.com", "client_id": "115883567556128264666", "auth_uri": "https://accounts.google.com/o/oauth2/auth", "token_uri": "https://oauth2.googleapis.com/token", "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-h37uk%40codelabz-966e5.iam.gserviceaccount.com" }' | |
dir: "functions/private/" | |
- name: Install dependencies | |
run: npm install --legacy-peer-deps | |
- run: cd functions && npm install --legacy-peer-deps | |
- run: npm install -g firebase-tools@11.30.0 | |
- name: Run Firebase Emulator and Start Tests | |
run: firebase emulators:exec --import=./testdata --project ${{ env.VITE_APP_FIREBASE_PROJECT_ID }} 'npm run test' | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: Cypress screenshots | |
path: /home/runner/work/Codelabz/Codelabz/cypress/screenshots | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Cypress Videos | |
path: /home/runner/work/Codelabz/Codelabz/cypress/videos/ |