Skip to content

Commit 355f8cd

Browse files
committed
fix(ci): move from pip-tools to poetry on layers to fix conflicts
1 parent 615448e commit 355f8cd

File tree

6 files changed

+445
-91
lines changed

6 files changed

+445
-91
lines changed

.github/workflows/publish_layer.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ jobs:
2828
uses: actions/checkout@v3
2929
with:
3030
fetch-depth: 0
31+
- name: Install poetry
32+
run: pipx install poetry
3133
- name: Setup Node.js
3234
uses: actions/setup-node@v3
3335
with:
@@ -37,6 +39,12 @@ jobs:
3739
with:
3840
python-version: "3.9"
3941
cache: "pip"
42+
- name: Resolve and install project dependencies
43+
# CDK spawns system python when compiling stack
44+
# therefore it ignores both activated virtual env and cached interpreter by GH
45+
run: |
46+
poetry export --format requirements.txt --output requirements.txt
47+
pip install -r requirements.txt
4048
- name: Set release notes tag
4149
run: |
4250
RELEASE_INPUT=${{ inputs.latest_published_version }}
@@ -47,9 +55,6 @@ jobs:
4755
run: |
4856
npm install -g aws-cdk@2.29.0
4957
cdk --version
50-
- name: install deps
51-
run: |
52-
pip install -r requirements.txt
5358
- name: CDK build
5459
run: cdk synth --context version=$RELEASE_TAG_VERSION -o cdk.out
5560
- name: zip output

.github/workflows/reusable_deploy_layer_stack.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555
steps:
5656
- name: checkout
5757
uses: actions/checkout@v3
58+
- name: Install poetry
59+
run: pipx install poetry
5860
- name: aws credentials
5961
uses: aws-actions/configure-aws-credentials@v1
6062
with:
@@ -69,13 +71,18 @@ jobs:
6971
with:
7072
python-version: "3.9"
7173
cache: "pip"
74+
- name: Resolve and install project dependencies
75+
# CDK spawns system python when compiling stack
76+
# therefore it ignores both activated virtual env and cached interpreter by GH
77+
run: |
78+
poetry export --format requirements.txt --output requirements.txt
79+
pip install -r requirements.txt
7280
- name: install cdk and deps
7381
run: |
7482
npm install -g aws-cdk@2.29.0
7583
cdk --version
7684
- name: install deps
77-
run: |
78-
pip install -r requirements.txt
85+
run: poetry install
7986
- name: Download artifact
8087
uses: actions/download-artifact@v3
8188
with:

0 commit comments

Comments
 (0)