A Serverless Function for retrieving a grouchy message about when trash pick is.
This project is built using maven. The following command can be used to build.
./mvnw clean package
The lambda function can be ran locally using sam by running the following command
sam build && sam local start-lambda
Unit Tests are ran as part of the maven build.
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.
./mvnw -P cucumber verify
To run the same tests against the production lambda function.
First use the aws configure
command to setup credentials for aws then run.
./mvnw -P cucumber verify -Dspring.profiles.active=prod
You can also run from your IDE by running grouch.message.cucumber.CucumberRunner
The code will automatically be built and deployed with a github action.
to deploy the application first use the aws configure
comand to setup credentials for aws, then run
sam deploy
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
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. You can run a scan locally by running this command.
./mvnw -Dsonar.login=${SONAR_TOKEN} verify sonar:sonar