Googe Action that uses the grouch trash service to tell you what day trash pickup will be. The day for trash changes on certain holidays, This google actions aims to help the user stay up to date on this information by making it easily accessible.
Builds use npm and can be ran using this command.
npm install
Unit tests are also ran using npm.
npm test
Acceptance tests are ran using cucumber. The tests can be ran locally using the firebase emulator. The tests can be ran by using this command.
./node_modules/firebase-tools/lib/bin/firebase.js functions:config:get > .runtimeconfig.json
./node_modules/firebase-tools/lib/bin/firebase.js emulators:exec "npm run cucumber"
To run the tests against the server using this command.
NODE_ENV=production npm run cucumber
Deployments are done through github actions
Deployments use the dialogflow-cli
to deploy to dialog flow. You can deploy from your local using this command.
dialogflow-cli import --credentials ./credentials.json .
Credentials will need to be exported out of the dialogflow console and saved as ./credential.json
Deploy the configuration for the firebase function using this command
firebase functions:config:set api.url="$api_url" api.key="$api_key"
Deployments use the firebase-tools
library to deploy the intent functions. You can deploy from your local using this command.
firebase deploy --token "$firebase_token"
The firebase token can be found in the firebase console.
OSS dependency scanning is done using Snyk as part of the deployment pipeline and results can be viewed on the github action logs. You can run a scan locally by running this command.
snyk monitor --file=functions/package-lock.json --severity-threshold=high
Sonar scans are done as part of the deployment pipeline and results can be viewed on the github action logs. Results can also be found on Sonarcloud.