Skip to content

Commit

Permalink
test(*): add extra test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
cabljac committed Apr 23, 2024
1 parent 1c70a2f commit 340d884
Show file tree
Hide file tree
Showing 30 changed files with 17,787 additions and 4,464 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/conditional-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,27 @@ jobs:
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Install Firebase CLI
uses: nick-invision/retry@v1
uses: nick-invision/retry@v3
with:
timeout_minutes: 10
retry_wait_seconds: 60
max_attempts: 3
command: npm i -g firebase-tools@11
command: npm i -g firebase-tools@13

- name: Setup e2e secrets
run: |
echo SMTP_PASSWORD=${{ secrets.SENDGRID_API_KEY }} >> _emulator/extensions/firestore-send-email-sendgrid.secret.local
- run: npm install -g rimraf
- run:
cd firestore-bigquery-export/functions && npm install -g --save-dev
@types/node
- run: cd ${{ matrix.extension }}/functions && npm install
- run: cd ${{ matrix.extension }}/functions && npm run build
- run: node scripts/changeFirebaseJson.cjs ${{ matrix.extension }}
- name: Start Firebase Emulator
run: cd _emulator && firebase emulators:start &
- run:
cd ${{ matrix.extension }}/functions && npm run testIfEmulatorRunning
export NODE_ENV=development && export CI_TEST=true &&
GOOGLE_CLOUD_PROJECT=demo-test && cd ${{ matrix.extension }}/functions
&& npm run testIfEmulatorRunning
131 changes: 130 additions & 1 deletion auth-mailchimp-sync/functions/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion auth-mailchimp-sync/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"clean": "rimraf lib",
"compile": "tsc",
"test": "jest",
"testIfEmulatorRunning": "wait-on tcp:4001 && jest",
"generate-readme": "firebase ext:info .. --markdown > ../README.md"
},
"dependencies": {
Expand All @@ -21,7 +22,8 @@
"@types/jest": "29.5.0",
"firebase-functions-test": "^3.2.0",
"jest": "29.5.0",
"ts-jest": "29.1.2"
"ts-jest": "29.1.2",
"wait-on": "^7.2.0"
},
"engines": {
"node": "18"
Expand Down
2 changes: 0 additions & 2 deletions delete-user-data/functions/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ const databaseURL = getDatabaseUrl(
config.selectedDatabaseInstance,
config.selectedDatabaseLocation
);
console.log("");

// Initialize the Firebase Admin SDK
admin.initializeApp({
credential: admin.credential.applicationDefault(),
Expand Down
Loading

0 comments on commit 340d884

Please sign in to comment.