Skip to content

Commit 4ff82c2

Browse files
committed
move the trigger of integration tests to distribute, right before release
1 parent 80f03ba commit 4ff82c2

File tree

4 files changed

+32
-21
lines changed

4 files changed

+32
-21
lines changed

.github/workflows/distribute.yaml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@ jobs:
99
package:
1010
uses: ./.github/workflows/build.yaml
1111

12+
integration-test:
13+
uses: ./.github/workflows/integration-test.yaml
14+
needs: package
15+
1216
distribute-python:
1317
runs-on: ubuntu-latest
1418
needs: package
1519
steps:
16-
- uses: actions/download-artifact@v3
17-
with:
18-
name: python
19-
path: dist
20-
2120
- run: pip install twine
2221

2322
- run: twine upload dist/*

.github/workflows/deploy.yaml renamed to .github/workflows/integration-test.yaml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
name: Deploy & Test Deployment
1+
name: Deploy & Integration Test
22

33
permissions:
44
id-token: write # required for requesting the JWT
55
contents: read # required for actions/checkout
66

77
on:
8-
# run this workflow when the `Distribute` workflow completes
9-
workflow_run:
10-
workflows: [Distribute]
11-
types: [completed]
12-
# ... or manually.
8+
workflow_call:
9+
1310
workflow_dispatch:
1411

1512
# remove later
16-
push:
17-
branches:
18-
- "feat/add-integration-tests"
13+
# push:
14+
# branches:
15+
# - "feat/add-integration-tests"
1916

2017
jobs:
21-
# run a job on a successful `Workflow` run.
22-
on-successful-release:
18+
deploy-and-integration-test:
19+
name: Deploy & Integration Test
2320
runs-on: ubuntu-latest
2421
env:
2522
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION_DEPLOY }}
@@ -41,14 +38,22 @@ jobs:
4138
uses: actions/setup-node@v3
4239
with:
4340
node-version: '18'
44-
41+
42+
- name: Download compiled eoapi-cdk artifact
43+
uses: actions/download-artifact@v3
44+
with:
45+
name: python
46+
path: dist
47+
48+
- name: Install eoapi-cdk from artifact
49+
run: pip install dist/python/*.gz
50+
4551
- name: Install deployment environment
4652
working-directory: integration_tests/cdk
4753
run: |
4854
python -m venv .deployment_venv
4955
source .deployment_venv/bin/activate
5056
pip install -r requirements.txt
51-
pip install --upgrade eoapi-cdk # make sure to take the latest version of eoapi-cdk since we're integration-testing the newest release.
5257
npm install
5358
deactivate
5459
@@ -76,7 +81,7 @@ jobs:
7681
run: |
7782
python -m venv .tests_venv
7883
source .tests_venv/bin/activate
79-
pip install -r requirements.txt
84+
pip install -e .
8085
deactivate
8186
8287
- name: Test the stack

integration_tests/cdk/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,15 @@ source .venv/bin/activate
2222
python -m pip install -r requirements.txt
2323
```
2424

25-
Note that `eoapi-cdk` isn't pinned, so that the latest version is always installed. Also install node dependencies with
25+
Install the latest `eoapi-cdk` either from PyPI:
26+
27+
```
28+
pip install eoapi-cdk
29+
```
30+
31+
Or alternatively, compile and package from the root of this repository to get the python version of the constructs locally.
32+
33+
Also install node dependencies with
2634

2735
```
2836
npm install

integration_tests/cdk/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
aws-cdk-lib>=2.75.0
22
aws_cdk.aws_cognito_identitypool_alpha>=2.75.0a0
33
aws-cdk.aws-apigatewayv2-alpha==2.95.1a0
4-
eoapi-cdk
54
constructs>=10.0.0,<11.0.0
65
pydantic==2.0.2
76
pydantic-settings==2.0.1

0 commit comments

Comments
 (0)