Alexa Skill for the UK Defra air quality index
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
__tests__
app
site
.eslintignore
.eslintrc.js
.gitignore
.npmignore
.travis.yml
README.md
config.js
env.sample.yml
env.yml
handler.js
jest-unit.config.json
package.json
serverless.yml
yarn.lock

README.md

UK Air Quality Alexa Skill

Alexa skill for reporting the Defra (Department for Environment, Food & Rural Affairs) air quality index

Build Status codecov

Usage

This is a Serverless app for AWS Lambda that uses the defra-air-quality-js library for accessing and parsing Defra XML data.

Deployment

The skill is deployed to AWS Lambda via Serverless, and can be done by running:

$ yarn deploy --profile= --deploymentBucket= --stage=[dev] --region=[eu-west-1]

Testing

The skill contains unit tests that can be run with Jest:

$ yarn test

Jest will generate code coverage, which can be found in the /coverage directory after running the above command.

There are also some dedicated functional tests, which pass sample Alexa JSON into the handler and return the response (this includes making any applicable network requests). This can be run with:

$ yarn test:functional