Skip to content

Commit 71e9ead

Browse files
committed
setup ci
1 parent 8df50d4 commit 71e9ead

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy using AWS CLI
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- 'README.md'
7+
branches:
8+
- main
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
integration-tests:
15+
name: Run Integration Tests
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- uses: actions/setup-java@v4
22+
with:
23+
distribution: 'temurin'
24+
java-version: '21'
25+
26+
- name: Build Lambdas
27+
run: cd lambda-functions && mvn clean package shade:shade
28+
29+
- name: Spin up LocalStack
30+
run: |
31+
docker compose up -d
32+
sleep 60
33+
env:
34+
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
35+
36+
- name: Setup the solutions
37+
run: |
38+
pip install awscli-local
39+
bash solutions/dynamodb-outage.sh
40+
bash solutions/route53-failover.sh
41+
42+
- name: Run Integration Tests
43+
run: |
44+
pip3 install boto3 pytest requests
45+
pytest
46+
env:
47+
AWS_DEFAULT_REGION: us-east-1
48+
AWS_REGION: us-east-1
49+
AWS_ACCESS_KEY_ID: test
50+
AWS_SECRET_ACCESS_KEY: test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ target/
33
.vscode/
44
.DS_Store
55
volume/
6+
.pytest_cache/

0 commit comments

Comments
 (0)