@@ -22,32 +22,31 @@ jobs:
22
22
- name : Install Python dependencies
23
23
run : |
24
24
python -m pip install --upgrade pip
25
- pip install -r requirements-dev.txt
26
- pip install -r infra/requirements.txt
27
- pip install -r backend/endpoints/datasets/requirements.txt
25
+ python -m pip install poetry
26
+ python -m poetry install
28
27
29
28
- name : Check last commit message
30
29
if : github.event_name == 'push'
31
30
run : |
32
- gitlint
31
+ poetry run gitlint
33
32
34
33
- name : Check all commit messages in Pull Request
35
34
if : github.event_name == 'pull_request'
36
35
run : >
37
- gitlint --commits
36
+ poetry run gitlint --commits
38
37
origin/${{ github.base_ref }}..${{ github.event.pull_request.head.sha }}
39
38
40
39
- name : Check Python code formatting
41
40
run : |
42
- black . --check --diff
41
+ poetry run black . --check --diff
43
42
44
43
- name : Check Python code quality
45
44
run : |
46
- pylint backend/ infra/
45
+ poetry run pylint backend/ infra/
47
46
48
47
- name : Check Python code import statements
49
48
run : |
50
- isort . --check --diff
49
+ poetry run isort . --check --diff
51
50
52
51
53
52
test :
@@ -69,12 +68,12 @@ jobs:
69
68
- name : Install Python dependencies
70
69
run : |
71
70
python -m pip install --upgrade pip
72
- pip install -r requirements-dev.txt
73
- pip install -r infra/requirements.txt
71
+ python -m pip install poetry
72
+ python -m poetry install
74
73
75
74
- name : Run unit tests
76
75
run : |
77
- pytest tests/
76
+ poetry run pytest tests/
78
77
79
78
80
79
test-infra :
96
95
- name : Install Python dependencies
97
96
run : |
98
97
python -m pip install --upgrade pip
99
- pip install -r requirements-dev.txt
100
- pip install -r infra/requirements.txt
101
- pip install -r backend/endpoints/datasets/requirements.txt
98
+ python -m pip install poetry
99
+ python -m poetry install
102
100
103
101
- name : Use Node.js 12.x for CDK deployment
104
102
@@ -110,7 +108,7 @@ jobs:
110
108
run : npm install -g aws-cdk
111
109
112
110
- name : Print CDK version
113
- run : cdk --version
111
+ run : poetry run cdk --version
114
112
115
113
- name : Configure AWS credentials
116
114
uses : aws-actions/configure-aws-credentials@v1
@@ -128,21 +126,21 @@ jobs:
128
126
129
127
- name : Deploy AWS stack for testing
130
128
run : |
131
- cdk bootstrap aws://unknown-account/ap-southeast-2
132
- cdk deploy --require-approval never geospatial-data-lake
129
+ poetry run cdk bootstrap aws://unknown-account/ap-southeast-2
130
+ poetry run cdk deploy --require-approval never geospatial-data-lake
133
131
working-directory : infra
134
132
135
133
- name : Run AWS infra tests
136
134
run : |
137
- pytest infra/tests/
135
+ poetry run pytest infra/tests/
138
136
139
137
- name : Run AWS backend tests
140
138
run : |
141
- pytest backend/tests/
139
+ poetry run pytest backend/tests/
142
140
143
141
- name : Destroy AWS stack used for testing
144
142
run : |
145
- cdk destroy --force geospatial-data-lake
143
+ poetry run cdk destroy --force geospatial-data-lake
146
144
working-directory : infra
147
145
148
146
@@ -167,8 +165,8 @@ jobs:
167
165
- name : Install Python dependencies
168
166
run : |
169
167
python -m pip install --upgrade pip
170
- pip install -r requirements-dev.txt
171
- pip install -r infra/requirements.txt
168
+ python -m pip install poetry
169
+ python -m poetry install --no-dev
172
170
173
171
- name : Use Node.js 12.x for CDK deployment
174
172
@@ -180,7 +178,7 @@ jobs:
180
178
run : npm install -g aws-cdk
181
179
182
180
- name : Print CDK version
183
- run : cdk --version
181
+ run : poetry run cdk --version
184
182
185
183
# NONPROD DEPLOYMENT
186
184
- name : (NonProd) Configure AWS credentials
@@ -199,9 +197,11 @@ jobs:
199
197
if : >
200
198
github.ref == 'refs/heads/master'
201
199
&& github.repository == 'linz/geospatial-data-lake'
200
+ env :
201
+ DEPLOY_ENV : nonprod
202
202
run : |
203
- cdk bootstrap aws://unknown-account/ap-southeast-2
204
- DEPLOY_ENV=nonprod cdk deploy --require-approval never geospatial-data-lake
203
+ poetry run cdk bootstrap aws://unknown-account/ap-southeast-2
204
+ poetry run cdk deploy --require-approval never geospatial-data-lake
205
205
working-directory : infra
206
206
207
207
# PROD DEPLOYMENT
@@ -221,7 +221,9 @@ jobs:
221
221
if : >
222
222
startsWith(github.ref, 'release')
223
223
&& github.repository == 'linz/geospatial-data-lake'
224
+ env :
225
+ DEPLOY_ENV : prod
224
226
run : |
225
- cdk bootstrap aws://unknown-account/ap-southeast-2
226
- DEPLOY_ENV=prod cdk deploy --require-approval never geospatial-data-lake
227
+ poetry run cdk bootstrap aws://unknown-account/ap-southeast-2
228
+ poetry run cdk deploy --require-approval never geospatial-data-lake
227
229
working-directory : infra
0 commit comments