Skip to content

Commit 78e0604

Browse files
committed
Add Makefile and upgrade workflow actions
1 parent ce5f159 commit 78e0604

File tree

2 files changed

+36
-5
lines changed

2 files changed

+36
-5
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,10 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v3
25-
26-
- uses: gautamkrishnar/keepalive-workflow@v1
24+
uses: actions/checkout@v4
2725

2826
- name: Setup Node.js
29-
uses: actions/setup-node@v3
27+
uses: actions/setup-node@v4
3028
with:
3129
node-version: 18
3230

@@ -46,7 +44,7 @@ jobs:
4644
4745
- name: Start LocalStack
4846
env:
49-
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
47+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
5048
run: |
5149
pip install localstack awscli-local[ver1]
5250
docker pull localstack/localstack-pro:latest

Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
export AWS_ACCESS_KEY_ID ?= test
2+
export AWS_SECRET_ACCESS_KEY ?= test
3+
export AWS_DEFAULT_REGION=us-east-1
4+
SHELL := /bin/bash
5+
6+
usage: ## Show this help
7+
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
8+
9+
install: ## Install dependencies
10+
@which localstack || pip install localstack
11+
@which awslocal || pip install awscli-local
12+
virtualenv env
13+
. env/bin/activate && pip install -r requirements.txt
14+
15+
start: ## Start LocalStack
16+
@test -n "${LOCALSTACK_AUTH_TOKEN}" || (echo "LOCALSTACK_AUTH_TOKEN is not set. Find your token at https://app.localstack.cloud/workspace/auth-token"; exit 1)
17+
@LOCALSTACK_AUTH_TOKEN=$(LOCALSTACK_AUTH_TOKEN) localstack start -d
18+
19+
stop: ## Stop LocalStack
20+
@localstack stop
21+
22+
ready: ## Wait until LocalStack is ready
23+
@echo Waiting on the LocalStack container...
24+
@localstack wait -t 30 && echo LocalStack is ready to use! || (echo Gave up waiting on LocalStack, exiting. && exit 1)
25+
26+
logs: ## Save the logs in a separate file
27+
@localstack logs > logs.txt
28+
29+
deploy: ## Deploy the CDK stack
30+
cdklocal bootstrap
31+
cdklocal deploy --require-approval never
32+
33+
.PHONY: usage install start stop ready logs deploy

0 commit comments

Comments
 (0)