Skip to content

[NO CHANGELOG][CM-904]feat: Checkout Widgets Example App + E2E Test #2

[NO CHANGELOG][CM-904]feat: Checkout Widgets Example App + E2E Test

[NO CHANGELOG][CM-904]feat: Checkout Widgets Example App + E2E Test #2

Workflow file for this run

name: Checkout PR
on:
pull_request:
branches:
- main
paths:
- 'packages/checkout/**'
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.TS_IMMUTABLE_SDK_NX_TOKEN }}
jobs:
build-lint-test-example-widgets-with-sdk:
name: Build, Lint & Test Example Widgets with latest SDK
runs-on: ubuntu-latest-8-cores
env:
NODE_OPTIONS: --max-old-space-size=14366
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: setup
uses: ./.github/actions/setup
- name: Get current SDK version string
uses: actions/github-script@v7.0.1
with:
script: |
const { data: latestRelease } = await github.rest.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
});
console.log("Current SDK version: ", latestRelease.tag_name);
return latestRelease.tag_name;
result-encoding: string
id: version
- name: Install SDK at current version
run: yarn workspace @examples/sdk-load-widgets-with-nextjs add @imtbl/sdk@${{ steps.version.outputs.result }}
- name: Build next app
run: yarn workspace @examples/sdk-load-widgets-with-nextjs build
- name: Build everything
run: yarn build
- name: Build local widgets bundle
run: yarn workspace @imtbl/checkout-widgets build:examplewidgets
- name: Lint examples
run: yarn workspace @examples/sdk-load-widgets-with-nextjs lint
- name: Setup playwright
uses: ./.github/actions/setup-playwright
- name: Test Widget example
run: yarn workspace @examples/sdk-load-widgets-with-nextjs test:latest