Skip to content

Commit

Permalink
Run E2E tests on canary releases #7475
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubox76 authored Jul 24, 2023
1 parent a5bf94c commit 66cebfb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/canary-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,15 @@ jobs:
NPM_TOKEN_APP_CHECK_COMPAT: ${{ secrets.NPM_TOKEN_APP_CHECK_COMPAT }}
NPM_TOKEN_API_DOCUMENTER: ${{ secrets.NPM_TOKEN_API_DOCUMENTER }}
CI: true
- name: Launch E2E tests workflow
# Trigger e2e-test.yml
run: |
VERSION_SCRIPT="const pkg = require('./packages/firebase/package.json'); console.log(pkg.version);"
VERSION_OR_TAG=`node -e "${VERSION_SCRIPT}"`
OSS_BOT_GITHUB_TOKEN=${{ secrets.OSS_BOT_GITHUB_TOKEN }}
curl -X POST \
-H "Content-Type:application/json" \
-H "Accept:application/vnd.github.v3+json" \
-H "Authorization:Bearer $OSS_BOT_GITHUB_TOKEN" \
-d "{\"event_type\":\"canary-tests\", \"client_payload\":{\"versionOrTag\":\"$VERSION_OR_TAG\"}}" \
https://api.github.com/repos/firebase/firebase-js-sdk/dispatches
4 changes: 3 additions & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: E2E Smoke Tests
# Allows REST trigger. Currently triggered by release-cli script during a staging run.
on:
repository_dispatch:
types: [staging-tests]
types: [staging-tests,canary-tests]

jobs:
test:
Expand Down Expand Up @@ -62,6 +62,8 @@ jobs:
- name: Tests succeeded
if: success()
run: node scripts/ci/notify-test-result.js success
# we don't want THIS step erroring to trigger the failure notification
continue-on-error: true
env:
WEBHOOK_URL: ${{ secrets.JSCORE_CHAT_WEBHOOK_URL }}
RELEASE_TRACKER_URL: ${{ secrets.RELEASE_TRACKER_URL }}
Expand Down

0 comments on commit 66cebfb

Please sign in to comment.