feat(TU-20040): Add isClosed
to onReady
callback payload
#229
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: Pull Request | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-lint-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node_version: | |
- 18 # end of life 2025-04-30 | |
- 20 # end of life 2026-04-30 | |
- 22 # end of life 2027-04-03 # please update SonarCloud below when there is new latest node version | |
name: build-lint-test - node ${{ matrix.node_version }} | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: Get yarn cache | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: | | |
**/node_modules | |
~/.cache | |
key: ${{ runner.os }}-repo-${{ github.event.pull_request.head.repo.full_name }}-node-${{ matrix.node_version }}-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('.github/workflows/**.yml') }} | |
- name: Install Node.js dependencies | |
# run when cache not found or PR is external (build fails for external PRs if dependencies are not installed) | |
if: steps.yarn-cache.outputs.cache-hit != 'true' || github.event.pull_request.head.repo.full_name != github.repository | |
run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: yarn lint | |
- run: yarn test:coverage | |
- name: Verify coverage file ready | |
run: find . | grep coverage | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@v2 | |
if: ${{ matrix.node_version == '22' }} | |
with: | |
args: > | |
-Dsonar.projectVersion=${{ github.run_id }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_CLOUD_TOKEN }} | |
functional: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Get yarn cache | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: | | |
**/node_modules | |
~/.cache | |
key: ${{ runner.os }}-repo-${{ github.event.pull_request.head.repo.full_name }}-node-16-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('.github/workflows/**.yml') }} | |
- name: Install Node.js dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- run: yarn build | |
- run: yarn test:functional | |
deploy_preview: | |
runs-on: ubuntu-latest | |
# skip for external PRs | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
steps: | |
- name: Check out Git repository | |
uses: | |
actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Get yarn cache | |
uses: actions/cache@v2 | |
id: yarn-cache | |
with: | |
path: | | |
**/node_modules | |
~/.cache | |
key: ${{ runner.os }}-repo-${{ github.event.pull_request.head.repo.full_name }}-node-16-yarn-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('.github/workflows/**.yml') }} | |
- name: Install Node.js dependencies | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- run: yarn lerna bootstrap | |
- run: yarn build | |
env: | |
NODE_ENV: 'production' | |
# Update registry and tokens with write access for releasing. | |
- run: rm ./.npmrc | |
- run: npm config set '//registry.npmjs.org/:_authToken' $NPM_TOKEN | |
- run: npm config set '//npm.pkg.github.com/:_authToken' $GH_TOKEN | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
- run: npm config set @typeform:registry https://npm.pkg.github.com/ # install jarvis from github | |
- run: yarn add -W @typeform/jarvis | |
- run: git checkout HEAD -- package.json # do not save jarvis dependency to package.json because it is private (the file is committed by semantic-release to bump version) | |
- run: yarn release:preview | |
env: | |
AWS_ASSETS_BUCKET: 'typeform-public-assets/embed' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_KEY }} | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
JARVIS_NOTIFY_PREVIEW_TEMPLATE: ${{ secrets.JARVIS_NOTIFY_PREVIEW_TEMPLATE }} | |
PUBLIC_CDN_URL: 'https://embed.typeform.com' |