Skip to content

Commit

Permalink
Allow Firebase emulators for local/CI testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariya Hidayat committed Apr 8, 2020
1 parent 113fb5c commit c5ac712
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
fire*.log
pubsub*.log

# Runtime data
pids
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
- script: npm ci
displayName: 'npm ci'

- script: npm test
displayName: 'npm test'
- script: npm run firebase -- emulators:exec "npm test" --project "$FIREBASE_PROJECT"
displayName: 'npm test (with Firebase emulators)'

- script: npm run firebase -- deploy --project "$FIREBASE_PROJECT" --token "$FIREBASE_TOKEN"
displayName: 'Deploy to Firebase'
Expand Down
8 changes: 8 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,13 @@
"source" : "/ping",
"function": "ping"
}]
},
"emulators": {
"functions": {
"port": 5001
},
"hosting": {
"port": 5000
}
}
}

0 comments on commit c5ac712

Please sign in to comment.