forked from no10ds/rapid
-
Notifications
You must be signed in to change notification settings - Fork 0
141 lines (113 loc) · 2.93 KB
/
dev.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
name: rAPId Dev Deployment
on:
push:
branches:
- '**'
workflow_dispatch:
jobs:
setup:
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Log commit SHA
run: echo $GITHUB_SHA
security-check:
needs:
- setup
runs-on: self-hosted
steps:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- run: pip install -r requirements.txt
- name: Run security checks
run: make security-check
api-dev:
needs:
- setup
- security-check
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Populate .env with additional vars
run: |
cp ./.github/.github.env .env
echo AWS_ACCOUNT=${{ secrets.AWS_ACCOUNT }} >> .env
echo AWS_REGION=${{ secrets.AWS_REGION }} >> .env
echo AWS_DEFAULT_REGION=${{ secrets.AWS_REGION }} >> .env
- name: Build API Image
run: make api/create-image
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Setup API environment
run: make api/setup
- name: API Static Analysis
run: make api/lint
- name: API Tests
run: make api/test
- name: API Tag and Upload
run: make api/tag-and-upload
sdk-dev:
needs:
- setup
- security-check
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Populate .env with additional vars
run: |
echo "TWINE_USERNAME=${{ secrets.TWINE_USERNAME_TEST }}" >> .env
echo "TWINE_PASSWORD=${{ secrets.TWINE_PASSWORD_TEST }}" >> .env
echo "TWINE_NON_INTERACTIVE=true" >> .env
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Setup Python Environment
run: |
make sdk/setup
- name: SDK Test
run: make sdk/test
- name: Set env variable
run: echo "TEST_SDK_VERSION=$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
- name: SDK Test Deploy
run: make sdk/release-test
ui-dev:
needs:
- setup
- security-check
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install UI Packages
run: make ui/setup
- name: UI Test
run: make ui/test
cleanup:
needs:
- setup
- security-check
- api-dev
- sdk-dev
- ui-dev
runs-on: self-hosted
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Clean Docker Context
if: always()
run: make api/clean-docker