File tree Expand file tree Collapse file tree 3 files changed +8135
-0
lines changed
Expand file tree Collapse file tree 3 files changed +8135
-0
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : push
4+
5+ jobs :
6+ build :
7+ name : " Build and Release"
8+ runs-on : ubuntu-latest
9+ services :
10+ dynamodb :
11+ image : amazon/dynamodb-local
12+ ports :
13+ - 8000:8000
14+ steps :
15+ - uses : actions/checkout@v3
16+ - name : Setup Python
17+ uses : actions/setup-python@v2
18+ - name : Install requirements.txt
19+ run : |
20+ pip3 install -r ./requirements.txt
21+ pip3 install pytest pytest-cov
22+ - name : Run tests
23+ run : |
24+ pytest
25+ pytest --cov .
26+ - name : Setup Node
27+ uses : actions/setup-node@v3
28+ with :
29+ node-version : 18
30+ - name : Install serverless
31+ run : npm install
32+ - name : Deploy QA
33+ if : github.ref == 'refs/heads/qa'
34+ run : serverless deploy -s qa
35+ env :
36+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
37+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
38+ - name : Deploy Production
39+ if : github.ref == 'refs/heads/main'
40+ run : serverless deploy -s prod
41+ env :
42+ AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
43+ AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
You can’t perform that action at this time.
0 commit comments