CircleCI
CircleCI: Deploy and Test
Run your test suite against the deployed environment to validate changes.
version: 2.1
jobs:
deploy:
docker:
- image: cimg/node:20.0
steps:
- checkout
- run: npm install
- run:
name: Deploy to Zuplo
command: |
set -o pipefail
npx zuplo deploy --api-key "$ZUPLO_API_KEY" 2>&1 | tee ./DEPLOYMENT_STDOUT
DEPLOYMENT_URL=$(grep -oP 'Deployed to \K(https://[^ ]+)' ./DEPLOYMENT_STDOUT)
echo "export DEPLOYMENT_URL=$DEPLOYMENT_URL" >> "$BASH_ENV"
- run:
name: Run Tests
command: npx zuplo test --endpoint "$DEPLOYMENT_URL"
workflows:
deploy-and-test:
jobs:
- deploy
This workflow:
- Deploys to Zuplo and captures the output
- Extracts the deployment URL
- Runs tests against the deployed environment
Next Steps
Last modified on