Skip to content

grouch-trash-service/grouch-trash-function

Repository files navigation

Grouch Trash Function

A Serverless function that gets the day for trash pickup.

Build

This project uses sam to build. The following command can be used

sam build

Running locally

The function can be ran locally using sam by running the following command

sam local start-lambda

Tests

Unit tests can be ran with the following command

PYTHONPATH=trash pytest

Cucumber Tests

This project uses Cucumber to automate testing and to describe behavior. To run the tests locally first start the function then run the following command

behave -D local 

To run the same tests against the production lambda function. First use the aws configure command to setup credentials then run

behave

Deploy

The code will automatically be built and deployed with a github action. To deploy the function manually first use the aws configure command to setup credentials for aws, then run

sam deploy

Code Scanning

Snyk OSS Scanning

OSS 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=trash/requirements.txt -- --allow-missing

Sonar Scanning

Sonar quality scans are done as part of the deployment pipeline and results can be viwed on the github action logs. Results can also be found on Sonarcloud.

About

A Serverless function that gets the day for trash pickup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published