Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(*): upodate node ci versions to 16 and 18 #544

Merged
merged 5 commits into from
Aug 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
cancel-in-progress: false
strategy:
matrix:
node: ["14", "16"]
node: ["18"]
max-parallel: 1
name: node.js_${{ matrix.node }}_test
steps:
Expand All @@ -34,8 +34,6 @@ jobs:
retry_wait_seconds: 60
max_attempts: 3
command: npm i -g firebase-tools
- name: Use extension commands
run: firebase --open-sesame extdev
- name: mask env paramaters
run: echo "::add-mask::$STRIPE_WEBHOOK_SECRET"
- name: Run tests with coverage
Expand Down
66 changes: 66 additions & 0 deletions firestore-stripe-payments/_emulator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*
firebase-debug.*.log*

# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
STRIPE_API_KEY=
STRIPE_API_KEY=
17 changes: 16 additions & 1 deletion firestore-stripe-payments/_emulator/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"hub": {
"port": 4000
},
"firestore": {
"port": 8080
},
"storage": {
"port": 9199
},
Expand All @@ -25,5 +28,17 @@
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
}
},
"functions": [
{
"source": "functions",
"codebase": "default",
"ignore": [
"node_modules",
".git",
"firebase-debug.log",
"firebase-debug.*.log"
]
}
]
}
1 change: 1 addition & 0 deletions firestore-stripe-payments/_emulator/functions/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
19 changes: 19 additions & 0 deletions firestore-stripe-payments/_emulator/functions/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Import function triggers from their respective submodules:
*
* const {onCall} = require("firebase-functions/v2/https");
* const {onDocumentWritten} = require("firebase-functions/v2/firestore");
*
* See a full list of supported triggers at https://firebase.google.com/docs/functions
*/

const { onRequest } = require("firebase-functions/v2/https");
const logger = require("firebase-functions/logger");

// Create and deploy your first functions
// https://firebase.google.com/docs/functions/get-started

// exports.helloWorld = onRequest((request, response) => {
// logger.info("Hello logs!", {structuredData: true});
// response.send("Hello from Firebase!");
// });
23 changes: 23 additions & 0 deletions firestore-stripe-payments/_emulator/functions/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"serve": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "18"
},
"main": "index.js",
"dependencies": {
"firebase-admin": "^11.8.0",
"firebase-functions": "^4.3.1"
},
"devDependencies": {
"firebase-functions-test": "^3.1.0"
},
"private": true
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default () => {
process.env.FIRESTORE_EMULATOR_HOST = 'localhost:8080';
process.env.FIREBASE_FIRESTORE_EMULATOR_ADDRESS = 'localhost:8080';
process.env.FIREBASE_AUTH_EMULATOR_HOST = 'localhost:9099';
process.env.FIRESTORE_EMULATOR_HOST = '127.0.0.1:8080';
process.env.FIREBASE_FIRESTORE_EMULATOR_ADDRESS = '127.0.0.1:8080';
process.env.FIREBASE_AUTH_EMULATOR_HOST = '127.0.0.1:9099';
};
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const createRandomSubscription = async (
card: {
number: '4242424242424242',
exp_month: 5,
exp_year: 2023,
exp_year: new Date().getFullYear() + 1,
cvc: '314',
},
});
Expand Down
5 changes: 5 additions & 0 deletions firestore-stripe-web-sdk/_emulator/.firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "extensions-testing"
}
}
66 changes: 66 additions & 0 deletions firestore-stripe-web-sdk/_emulator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
firebase-debug.log*
firebase-debug.*.log*

# Firebase cache
.firebase/

# Firebase config

# Uncomment this if you'd like others to create their own Firebase project.
# For a team working on the same Firebase project(s), it is recommended to leave
# it commented so all members can deploy to the same project(s) in .firebaserc.
# .firebaserc

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
19 changes: 19 additions & 0 deletions firestore-stripe-web-sdk/_emulator/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"emulators": {
"firestore": {
"port": 8080,
"host": "0.0.0.0"
},
"auth": {
"port": 9099,
"host": "0.0.0.0"
},
"ui": {
"enabled": true
}
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
}
}
123 changes: 123 additions & 0 deletions firestore-stripe-web-sdk/_emulator/firestore.indexes.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"indexes": [
{
"collectionGroup": "acknowledgements",
"queryScope": "COLLECTION_GROUP",
"fields": [
{
"fieldPath": "ackEvent",
"order": "ASCENDING"
},
{
"fieldPath": "userId",
"order": "ASCENDING"
},
{
"fieldPath": "createdAt",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "acknowledgements",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "userId",
"order": "ASCENDING"
},
{
"fieldPath": "createdAt",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notices",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "type",
"order": "ASCENDING"
},
{
"fieldPath": "createdAt",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "notices",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "type",
"order": "ASCENDING"
},
{
"fieldPath": "version",
"order": "ASCENDING"
},
{
"fieldPath": "createdAt",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "queued_writes",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "state",
"order": "ASCENDING"
},
{
"fieldPath": "deliverTime",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "queued_writes",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "state",
"order": "ASCENDING"
},
{
"fieldPath": "leaseExpireTime",
"order": "ASCENDING"
}
]
},
{
"collectionGroup": "reviews",
"queryScope": "COLLECTION_GROUP",
"fields": [
{
"fieldPath": "Id",
"order": "ASCENDING"
},
{
"fieldPath": "Desription",
"order": "ASCENDING"
}
]
}
],
"fieldOverrides": [
{
"collectionGroup": "subcollection",
"fieldPath": "foo",
"ttl": false,
"indexes": [
{
"order": "ASCENDING",
"queryScope": "COLLECTION_GROUP"
}
]
}
]
}
Loading
Loading