-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (73 loc) · 2.19 KB
/
pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Run Integration Tests
on:
push:
paths-ignore:
- "README.md"
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
run-it-tests-job:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.5.7"
terraform_wrapper: false
- name: Set up Python 3.11
id: setup-python
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: "pipenv" # caching pipenv dependencies
- name: Install pipenv
id: install-pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
shell: bash
- name: Set up Project
run: |
pipenv install
- name: Start LocalStack
run: |
docker pull localstack/localstack
# Start LocalStack in the background
LS_LOG=trace pipenv run localstack start -d
# Wait 30 seconds for the LocalStack container to become ready before timing out
echo "Waiting for LocalStack startup..."
pipenv run localstack wait -t 30
echo "Startup complete"
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install website dependencies
run: npm --prefix website ci
## TODO: Set up CDKTF cli
## TODO: Deploy Backend with CDKTF
## TODO: Deploy Frontend with CDKTF
- name: Run Tests
env:
AWS_DEFAULT_REGION: us-east-1
AWS_REGION: us-east-1
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
run: |
pipenv run pytest -v tests
- name: Show localstack logs
if: always()
run: |
pipenv run localstack logs
- name: Generate a Diagnostic Report
if: failure()
run: |
curl -s localhost:4566/_localstack/diagnose | gzip -cf > diagnose.json.gz
- name: Upload the Diagnostic Report
if: failure()
uses: actions/upload-artifact@v4
with:
name: diagnose.json.gz
path: ./diagnose.json.gz