Skip to content

Commit 89ab547

Browse files
authored
* Add CDK test infrastructure (#706)
* Delete CFN template-based test infrastructure * Update docs * Replace db password string with a secret value
1 parent 1e22878 commit 89ab547

25 files changed

+735
-938
lines changed

.github/workflows/static-checking.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ jobs:
2828
run: |
2929
python -m pip install --upgrade pip
3030
pip install -U -r requirements-dev.txt
31-
- name: CloudFormation Lint - Base
32-
run: cfn-lint -t cloudformation/base.yaml
33-
- name: CloudFormation Lint - Databases
34-
run: cfn-lint -t cloudformation/databases.yaml
3531
- name: mypy check
3632
run: mypy awswrangler
3733
- name: Flake8 Lint

.gitignore

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Byte-compiled / optimized / DLL files
2-
__pycache__/
2+
*__pycache__/
33
*.py[cod]
44
*$py.class
55

@@ -47,7 +47,7 @@ nosetests.xml
4747
coverage.xml
4848
*.cover
4949
.hypothesis/
50-
.pytest_cache/
50+
*.pytest_cache/
5151
test-reports/
5252

5353
# Translations
@@ -90,9 +90,8 @@ celerybeat-schedule
9090

9191
# Environments
9292
.env
93-
.venv
94-
.venv2
95-
env/
93+
*venv*/
94+
*env/
9695
venv*/
9796
ENV/
9897
env.bak/
@@ -145,3 +144,11 @@ building/lambda/arrow
145144
/docs/build/
146145
/docs/source/_build/
147146
/docs/source/stubs/
147+
148+
# Swap
149+
*.swp
150+
151+
# CDK
152+
*package-lock.json
153+
*.cdk.staging
154+
*cdk.out

CONTRIBUTING.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,21 +137,29 @@ or
137137

138138
``pip install -r requirements-dev.txt``
139139

140-
* [OPTIONAL] Set AWS_DEFAULT_REGION to define the region the Data Lake Test envrioment will deploy into. You may want to choose a region which you don't currently use:
140+
* Go to the ``test_infra`` directory
141+
142+
``cd test_infra``
143+
144+
* Install CDK dependencies:
145+
146+
``pip install -r requirements.txt``
147+
148+
* [OPTIONAL] Set AWS_DEFAULT_REGION to define the region the Data Lake Test environment will deploy into. You may want to choose a region which you don't currently use:
141149

142150
``export AWS_DEFAULT_REGION=ap-northeast-1``
143151

144-
* Go to the ``cloudformation`` directory
152+
* Go to the ``scripts`` directory
145153

146-
``cd cloudformation``
154+
``cd scripts``
147155

148156
* Deploy the Cloudformation template `base.yaml`
149157

150158
``./deploy-base.sh``
151159

152160
* Return to the project root directory
153161

154-
``cd ..``
162+
``cd ../../``
155163

156164
* Run the validation script:
157165

@@ -167,7 +175,7 @@ or
167175

168176
* [OPTIONAL] To remove the base test environment cloud formation stack post testing:
169177

170-
``./cloudformation/delete-base.sh``
178+
``./test_infra/scripts/delete-base.sh``
171179

172180
### Full test environment
173181

@@ -186,13 +194,21 @@ or
186194

187195
``pip install -r requirements-dev.txt``
188196

197+
* Go to the ``test_infra`` directory
198+
199+
``cd test_infra``
200+
201+
* Install CDK dependencies:
202+
203+
``pip install -r requirements.txt``
204+
189205
* [OPTIONAL] Set AWS_DEFAULT_REGION to define the region the Full Test envrioment will deploy into. You may want to choose a region which you don't currently use:
190206

191207
``export AWS_DEFAULT_REGION=ap-northeast-1``
192208

193-
* Go to the ``cloudformation`` directory
209+
* Go to the ``scripts`` directory
194210

195-
``cd cloudformation``
211+
``cd scripts``
196212

197213
* Deploy the Cloudformation templates `base.yaml` and `databases.yaml`. This step could take about 15 minutes to deploy.
198214

@@ -212,7 +228,7 @@ or
212228

213229
* Return to the project root directory
214230

215-
``cd ..``
231+
``cd ../../``
216232

217233
* [OPTIONAL] If you intend to run all test, you also need to make sure that you have Amazon QuickSight activated and your AWS user must be register on that.
218234

@@ -234,9 +250,9 @@ or
234250

235251
* [OPTIONAL] To remove the base test environment cloud formation stack post testing:
236252

237-
``./cloudformation/delete-base.sh``
253+
``./test_infra/scripts/delete-base.sh``
238254

239-
``./cloudformation/delete-databases.sh``
255+
``./test_infra/scripts/delete-databases.sh``
240256

241257
## Recommended Visual Studio Code Recommended setting
242258

0 commit comments

Comments
 (0)