-
Notifications
You must be signed in to change notification settings - Fork 11
81 lines (61 loc) · 1.87 KB
/
cicd.yml
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
# This is a basic workflow to help you get started with Actions
name: CI/CD
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches:
- develop
- 'release/*'
tags:
- prd-v*
pull_request:
branches:
- develop
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install NodeJS for serverless framework
uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: Installing Serverless framework and plugins
run: make serverless
- name: Installing dependencies
run: make deps
- name: Static code analysis (sorting imports using isort)
run: make isort
- name: Static code analysis (check code formatting using black)
run: make black
- name: Static code analysis (flake8 tool)
run: make lint
- name: Code security checkings (bandit tool)
run: make security
- name: Unit tests
run: make unittest
- name: Code coverage
run: make cov
- name: Serverless AWS authentication
run: sls config credentials --provider aws --key ${{ secrets.AWS_KEY }} --secret ${{ secrets.AWS_SECRET }}
- name: Deploy
run: make deploy
- name: End to End Tests
run: make e2e-tests
#- name: Load tests
#run: make load-tests
#- name: Destroy
#run: make destroy