canary-tests #204
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E Smoke Tests | |
# Allows REST trigger. Currently triggered by release-cli script during a staging run. | |
on: | |
repository_dispatch: | |
types: [staging-tests,canary-tests] | |
jobs: | |
test: | |
name: Run E2E Smoke Tests | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
# Run any command steps in the /e2e subdir | |
working-directory: './e2e' | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@master | |
- name: Set up Node (16) | |
uses: actions/setup-node@master | |
with: | |
node-version: 16.x | |
- name: install Chrome stable | |
run: | | |
sudo apt-get update | |
sudo apt-get install google-chrome-stable | |
- name: Bump Node memory limit | |
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV | |
- name: Write project config | |
env: | |
PROJECT_CONFIG: ${{ secrets.TEST_PROJECT_CONFIG }} | |
TEST_ACCOUNT: ${{ secrets.TEST_ACCOUNT }} | |
run: | | |
echo "export const config = $PROJECT_CONFIG; export const testAccount = $TEST_ACCOUNT" > firebase-config.js | |
- name: Yarn install | |
run: | | |
echo "Installing firebase@${{ github.event.client_payload.versionOrTag }}" | |
yarn add firebase@${{ github.event.client_payload.versionOrTag }} | |
yarn | |
- name: Deploy "callTest" cloud function | |
run: | | |
pushd functions | |
npm install | |
popd | |
npx firebase-tools deploy --only functions:callTest --project jscore-sandbox-141b5 --token $FIREBASE_CLI_TOKEN | |
working-directory: ./config | |
env: | |
FIREBASE_CLI_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }} | |
- name: Do modular build | |
run: yarn build:modular | |
- name: Do compat build | |
run: yarn build:compat | |
- name: Run modular tests | |
env: | |
APP_CHECK_DEBUG_TOKEN: ${{ secrets.APP_CHECK_DEBUG_TOKEN }} | |
run: xvfb-run yarn test:modular | |
- name: Run compat tests | |
env: | |
APP_CHECK_DEBUG_TOKEN: ${{ secrets.APP_CHECK_DEBUG_TOKEN }} | |
run: xvfb-run yarn test:compat | |
- 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 }} | |
VERSION_OR_TAG: ${{ github.event.client_payload.versionOrTag }} | |
# run in root | |
working-directory: '.' | |
- name: Tests failed | |
if: failure() | |
run: node scripts/ci/notify-test-result.js fail | |
env: | |
WEBHOOK_URL: ${{ secrets.JSCORE_CHAT_WEBHOOK_URL }} | |
RELEASE_TRACKER_URL: ${{ secrets.RELEASE_TRACKER_URL }} | |
VERSION_OR_TAG: ${{ github.event.client_payload.versionOrTag }} | |
# run in root | |
working-directory: '.' |