You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
adjust README to include notes on Makefiles and the CI (#209)
* adjust README to include notes on Makefiles and the CI
* fix header link
* fix header link
* clarify test-ci target
* fix formatting
* fix formatting
* fix formatting
Copy file name to clipboardExpand all lines: README.md
+49Lines changed: 49 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,3 +71,52 @@ git pull origin master
71
71
```
72
72
73
73
The above commands use `sparse-checkout` to only pull the sample you are interested in. You can find the name of the sample directory in the table above.
74
+
75
+
# Developer Notes
76
+
77
+
## Makefiles for samples
78
+
All samples should have a Makefile to unify the execution of the otherwise heterogeneous samples.
79
+
It needs to fulfill two criteria:
80
+
- The sample should be executable independently, since it can be checked out on its own (see [Checking out a single sample](#checking-out-a-single-sample)).
81
+
- It should contain a `test-ci` target to be executed automatically within the CI pipeline. This step needs to take care of all infrastructure tasks (starting/stopping/logs/etc) in addition to any sample commands executed.
82
+
83
+
A typical Makefile looks like this:
84
+
```bash
85
+
export AWS_ACCESS_KEY_ID ?= test
86
+
export AWS_SECRET_ACCESS_KEY ?= test
87
+
export AWS_DEFAULT_REGION=us-east-1
88
+
SHELL := /bin/bash
89
+
90
+
usage: ## Show this help
91
+
@fgrep -h "##"$(MAKEFILE_LIST)| fgrep -v fgrep | sed -e 's/\\$$//'| sed -e 's/##//'
92
+
93
+
install: ## Install dependencies
94
+
@which localstack || pip install localstack
95
+
@which awslocal || pip install awscli-local
96
+
## install whatever else you need, like node modules, python packages, etc.
0 commit comments