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

Develop a better lambda function production test #236

Open
tim-macphail opened this issue Mar 11, 2023 · 0 comments
Open

Develop a better lambda function production test #236

tim-macphail opened this issue Mar 11, 2023 · 0 comments
Assignees
Labels

Comments

@tim-macphail
Copy link
Collaborator

# Run this job 5 minutes after the previous job
test-deployment:
needs: deployment
runs-on: ubuntu-latest
steps:
- name: git-clone
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install curl jq git-lfs
git lfs install
git lfs pull --include="server/test-data/CPSC331/CPSC331.pdf"
- name: test
# Give the lambda function time to deploy
run: |
sleep 120
cd server
./test-prod.sh

API_RESPONSE=$(curl --silent --show-error --location --request POST "${API_URL}/files" \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F '[email protected];type=application/pdf')

A better method might be to set up an endpoint /version that returns the version of the server.

@tim-macphail tim-macphail self-assigned this Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant