Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add integration tests #69

Merged
merged 32 commits into from
Feb 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3537795
feat: add integration tests
vincentsarago Sep 5, 2023
f1c1d1f
add eoapi-cdk upgrade command and pip cache
emileten Sep 6, 2023
aab0acb
test commit, to revert
emileten Sep 6, 2023
d9749de
Revert "test commit, to revert"
emileten Sep 6, 2023
1300c4e
update workflow
emileten Sep 11, 2023
c47f6d6
update workflow to run when release happens, move tests here
emileten Sep 11, 2023
a63c909
instead of cloning the eoapi-template repo, copy the code here so tha…
emileten Sep 21, 2023
6ebc271
trailing wsp
emileten Sep 21, 2023
80f03ba
run action with push to try
emileten Sep 21, 2023
4ff82c2
move the trigger of integration tests to distribute, right before rel…
emileten Sep 27, 2023
eb20644
feat!: custom runtime for bootstrapper and custom runtimes from Docke…
emileten Oct 5, 2023
385ab1b
fix a couple bugs found in the first changes
emileten Oct 10, 2023
dbcada8
avoid maintaining custom interfaces for configurable lambda propertie…
emileten Oct 12, 2023
7573398
expose bootstrapper props in pgstacdatabase construct constructor
emileten Oct 12, 2023
926a6a1
merge database and boostrapper files to solve casting bug
emileten Oct 17, 2023
f725f28
bump and harmonize pypgstac to 0.7.10 across apps
emileten Oct 27, 2023
f48e334
bump cachetools
emileten Oct 27, 2023
7b62f2a
some changes to allow for less security
emileten Oct 27, 2023
7c75981
bump python to 3.11
emileten Oct 31, 2023
ccfce6b
change base image for bootstrapper to use python 311
emileten Oct 31, 2023
a7aea2b
fix linting issues
emileten Oct 31, 2023
9e886a2
Merge branch 'feat/custom-runtimes' into feat/add-integration-tests
emileten Oct 31, 2023
b973fbc
Merge branch 'main' into feat/add-integration-tests
emileten Feb 19, 2024
64e67b7
move integration tests to step before release, improve naming of work…
emileten Feb 19, 2024
c7904ef
lint
vincentsarago Feb 20, 2024
92b4bf9
fix moto requirement
vincentsarago Feb 20, 2024
97b5a32
test to fix deployment : try adding s3 endpoint and force allow publi…
emileten Feb 21, 2024
4ede0a5
lint and make lambda functions more configurable
emileten Feb 21, 2024
b4de035
moving deploy to a separate workflow
emileten Feb 21, 2024
92cec0d
remove useless dependencies in deployment tests, turn on pull request…
emileten Feb 21, 2024
b4fe0f6
when tearing down the infrastructure, synthesize the cloud formation …
emileten Feb 21, 2024
b08e8b3
update readmes and revive the artifact download in python distribution
emileten Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: deploy and integration test

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

on:
workflow_dispatch:

jobs:
deploy-and-integration-test:
runs-on: ubuntu-latest

steps:

- name: Checkout repository with template stack
uses: actions/checkout@v3
with:
repository: developmentseed/eoapi-template
path: eoapi-template
emileten marked this conversation as resolved.
Show resolved Hide resolved

- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.10

- name: Install dependencies to deploy the stack
run: |
cd eoapi-template
python -m venv .deployment_venv
source .deployment_venv/bin/activate
pip install -r requirements.txt
npm install -g aws-cdk
deactivate
cd ..

- name: Deploy the stack
env:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
cd eoapi-template
source .deployment_venv/bin/activate
cdk deploy --all --require-approval never
echo "ingestor_url=$(aws cloudformation describe-stacks --stack-name eoapi-template-demo-test-pgSTAC-infra --query "Stacks[0].Outputs[?contains(OutputKey, 'stacingestor')].OutputValue | [0]" --output text)" >> $GITHUB_OUTPUT
echo "stac_api_url=$(aws cloudformation describe-stacks --stack-name eoapi-template-demo-test-pgSTAC-infra --query "Stacks[0].Outputs[?contains(OutputKey, 'stacapi')].OutputValue | [0]" --output text)" >> $GITHUB_OUTPUT
echo "titiler_pgstac_api_url=$(aws cloudformation describe-stacks --stack-name eoapi-template-demo-test-pgSTAC-infra --query "Stacks[0].Outputs[?contains(OutputKey, 'titiler')].OutputValue | [0]" --output text)" >> $GITHUB_OUTPUT
deactivate
cd ..

- name: Checkout the repo with the tests
uses: actions/checkout@v3
with:
repository: developmentseed/eoapi-tests
path: tests

- name: Test the stack
env:
ingestor_url: ${{ steps.deploy_the_stack.outputs.ingestor_url }}
stac_api_url: ${{ steps.deploy_the_stack.outputs.stac_api_url }}
titiler_pgstac_api_url: ${{ steps.deploy_the_stack.outputs.titiler_api_url }}
run: |
cd tests
python -m venv .tests_venv
source .tests_venv/bin/activate
pip install -e tests
pytest eoapi-tests
deactivate
cd ..

- name: Tear down the stack
run: |
vincentsarago marked this conversation as resolved.
Show resolved Hide resolved
cd eoapi-template
source .deployment_venv/bin/activate
cdk destroy --all --require-approval never
deactivate
cd ..
Loading