Skip to content

Commit

Permalink
feat(ci:circleci): Add localstack state management
Browse files Browse the repository at this point in the history
  • Loading branch information
lakkeger committed Mar 20, 2024
1 parent 3722656 commit 4bdfff2
Showing 1 changed file with 40 additions and 6 deletions.
46 changes: 40 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,50 @@ version: 2.1
orbs:
localstack: localstack/[email protected]
jobs:
localstack-test:
save-state:
executor: localstack/default
steps:
- localstack/start
- localstack/start
- checkout
- run:
command: echo "Running my custom application initialization logic ..."
name: Install dependencies
command:
pip install -r requirements-dev.txt
- localstack/wait
- run:
command: echo "Now LocalStack has fully started up, and is ready to use!"
name: Deploy infrastructure
command:
bin/deploy.sh
- run:
name: Export state
command: localstack state export ls-state.zip
- save_cache:
paths:
- ls-state.zip
key: ls-state
# - save_cache:
# paths:
# - ~/.cache/pip
# key: python-deps
load-state:
executor: localstack/default
steps:
- localstack/start
- checkout
- run:
name: Install dependencies
command:
pip install -r requirements-dev.txt
- localstack/wait
- restore_cache:
key: ls-state
- run:
name: Import state
command: (test -f ls-state.zip && localstack state import ls-state.zip) || true
workflows:
localstack-test:
setup-infra:
jobs:
- save-state
test:
jobs:
- localstack-test
- load-state

0 comments on commit 4bdfff2

Please sign in to comment.