Skip to content

Commit

Permalink
ci: add tests on deploy to prod and pr
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardobridge committed Jan 24, 2024
1 parent 348a221 commit a2bfa1e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: Deploy to prod
on:
workflow_dispatch:
schedule:
# every monday at 6:00 AM UTC
- cron: '0 6 * * 1'
# every 2 hours
- cron: '0 */2 * * *'

jobs:
deploy-prod:
Expand All @@ -16,4 +16,17 @@ jobs:
AWS_DEPLOYER_ROLE: ${{ secrets.AWS_DEPLOYER_ROLE }}
DD_API_KEY: ${{ secrets.DD_API_KEY }}
with:
ENVIRONMENT: prod
ENVIRONMENT: prod

run-perf-smoke:
uses: ./.github/workflows/run-performance-test.yaml
permissions:
id-token: write
contents: read
secrets:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
ARTILLERY_CLOUD_API_KEY: ${{ secrets.ARTILLERY_CLOUD_API_KEY }}
with:
ENVIRONMENT: prod
TEST_TYPE: smoke
VERSION: ${{ github.sha }}
17 changes: 16 additions & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,25 @@ jobs:
run: echo "Running functional tests against ${{ needs.deploy-ephemeral.outputs.SERVICE_URL }}"
env:
SERVICE_URL: ${{ needs.deploy-ephemeral.outputs.SERVICE_URL }}

run-perf-regression:
uses: ./.github/workflows/run-performance-test.yaml
needs: [deploy-ephemeral, run-functional-tests]
permissions:
id-token: write
contents: read
secrets:
DD_API_KEY: ${{ secrets.DD_API_KEY }}
ARTILLERY_CLOUD_API_KEY: ${{ secrets.ARTILLERY_CLOUD_API_KEY }}
with:
ENVIRONMENT: custom
TEST_TYPE: regression
VERSION: ${{ github.sha }}
SERVICE_URL: ${{ needs.deploy-ephemeral.outputs.SERVICE_URL }}

teardown-ephemeral-env:
uses: ./.github/workflows/stack-delete.yaml
needs: run-functional-tests
needs: run-perf-regression
permissions:
id-token: write
contents: read
Expand Down

0 comments on commit a2bfa1e

Please sign in to comment.