11version : 2.1
22
3-
4- orbs :
5- localstack : localstack/platform@2.1
6-
7-
83jobs :
94 save-state :
10- executor : localstack/default
5+ machine :
6+ image : ubuntu-2204:current
7+ environment :
8+ LOCALSTACK_AUTH_TOKEN : ${LOCALSTACK_AUTH_TOKEN}
9+ AWS_DEFAULT_REGION : us-east-1
10+ AWS_REGION : us-east-1
11+ AWS_ACCESS_KEY_ID : test
12+ AWS_SECRET_ACCESS_KEY : test
13+ DEBUG : 1
14+ LS_LOG : trace
1115 steps :
1216 - checkout
1317 - restore_cache :
@@ -20,22 +24,24 @@ jobs:
2024 # Currently highest available 3.11 on CircleCI runner
2125 test -d /opt/circleci/.pyenv/versions/3.11.1 || pyenv install 3.11.1
2226 pyenv global 3.11.1
23- - localstack/start
27+ - run :
28+ name : Install LocalStack CLI
29+ command : python3 -m pip install localstack awscli-local[ver1]
30+ - run :
31+ name : Start LocalStack
32+ command : |
33+ docker pull localstack/localstack:latest
34+ localstack start -d
35+ localstack wait -t 60
2436 - run :
2537 name : Install dependencies
26- command :
27- pip3 install -r requirements-dev.txt --upgrade
28- - localstack/wait
38+ command : pip3 install -r requirements-dev.txt --upgrade
2939 - run :
3040 name : Build lambdas
31- command :
32- deployment/build-lambdas.sh
33-
41+ command : deployment/build-lambdas.sh
3442 - run :
3543 name : Deploy infrastructure
36- command :
37- deployment/awslocal/deploy.sh
38-
44+ command : deployment/awslocal/deploy.sh
3945 - run :
4046 name : Export state
4147 command : localstack state export ls-state.zip
@@ -50,50 +56,54 @@ jobs:
5056 - store_artifacts :
5157 path : ls-state.zip
5258
53-
5459 load-state :
55- executor : localstack/default
60+ machine :
61+ image : ubuntu-2204:current
5662 environment :
57- AWS_DEFAULT_REGION : us-east-1
58- AWS_REGION : us-east-1
59- AWS_ACCESS_KEY_ID : test
60- AWS_SECRET_ACCESS_KEY : test
61- DEBUG : 1
62- LS_LOG : trace
63+ LOCALSTACK_AUTH_TOKEN : ${LOCALSTACK_AUTH_TOKEN}
64+ AWS_DEFAULT_REGION : us-east-1
65+ AWS_REGION : us-east-1
66+ AWS_ACCESS_KEY_ID : test
67+ AWS_SECRET_ACCESS_KEY : test
68+ DEBUG : 1
69+ LS_LOG : trace
6370 steps :
71+ - checkout
6472 - restore_cache :
6573 key : python-deps-
6674 - run :
6775 name : Choose python version
68- command :
69- pyenv global 3.11.1
70- - localstack/start
71- - checkout
76+ command : pyenv global 3.11.1
77+ - run :
78+ name : Install LocalStack CLI
79+ command : python3 -m pip install localstack awscli-local[ver1]
80+ - run :
81+ name : Start LocalStack
82+ command : |
83+ docker pull localstack/localstack:latest
84+ localstack start -d
85+ localstack wait -t 60
7286 - run :
7387 name : Install dependencies
74- command :
75- pip3 install -r requirements-dev.txt
76- - localstack/wait
88+ command : pip3 install -r requirements-dev.txt
7789 - attach_workspace :
7890 at : .
7991 - run :
8092 name : Import state
8193 command : test -f ls-state.zip && localstack state import ls-state.zip
8294 - run :
8395 name : Run Tests
84- command :
85- pytest tests
96+ command : pytest tests
8697 - run :
8798 when : on_fail
8899 name : Dump Localstack logs
89100 command : localstack logs | tee localstack.log
90101 - store_artifacts :
91102 path : localstack.log
92103
93-
94104workflows :
95105 do-tests :
96106 jobs :
97107 - save-state
98108 - load-state :
99- requires : [save-state]
109+ requires : [save-state]
0 commit comments