Skip to content

Commit 55126ad

Browse files
sf-kyle-wrightvcua-mobifybendvcszirpesfshethj
authored
@W-19396339 merge develop to feature (#3153)
* Update CHANGELOG.md * bump versions * Bump versions in mcp server * Initial Commit Add initGit option Update readme for create app tool Always use latest for create app npx package version. * Change when git init is run also added basic gitignore for non-extension projects * Update CHANGELOG.md * Fix tests * Rename pwa-kit-mcp project * Update server.js * Include bin entry in package.json * Fix dependencies etc * Add example with output dir * Punctuation fix in readme * Update program.json PR feedback on description. Signed-off-by: Ben Chypak <bchypak@mobify.com> * Rename package to pwa-kit-mcp * Update server json in readme * Update readme and bump version * Ensure the latest version is used in readme example * Version align the mcp server with the platform version * Use --initGit flag and test for .git/ creation * Add flag both commands for template and presets * Ensure gitignore is created * Ensure default command includes --initGit * Update base command * qa prompt * update * Bump versions * Clean up changelogs * Update usid expiry to match refresh_token expiry * Linting fix * Update changelog * Better prompting for cursor and create app program * Update packages/commerce-sdk-react/src/auth/index.ts Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com> Signed-off-by: Jainam Sheth <99490559+shethj@users.noreply.github.com> * Add unit tests for usid expiry * Remove overlapping test cases * bump version * bump develop to next dev version * Update changelogs * Change version number * Update readme * Move tools to tools folder * Clean up files/folders, create new tool folder. * Lint * A11y tests - Handle dynamic aria labels generated by chakra UI (#2864) * Handle dynamic aria labels generated by chakra UI * improve sanitization --------- Co-authored-by: Alex Vuong <alex.vuong@salesforce.com> * initial implementation of create page mcp tool * fix * support open url * fix the import * update README and changelog * Modified create page mcp tool * Added Image Componentsupport to Create page MCP tool * Fixed failing tests * Added new and fixed failing tests and corrected linting issues * Added new test and minor update to system prompt * Updated image component functionality * Updated system prompt * Fixed routes issue * Added tests and comments * Fixed merge conflicts and moved cursor to retail-react-app * skip changelog * Removed unused const * Addressed comments * Update reading expiry time for usid * Removed the cursor rule * Update codeowners file to include ownership for specific features (#2921) * Update codeowners * @W-18895609: 🚀 Shopper Agent Experience v3.0 (#2658) * feat: shopper agent experience v3.0 * fix: enabling streaming (#2911) * Committing for Rules and cleanup * skip changelog * Fixed tests * Remove reference to claude and clean up readme * Update CHANGELOG.md * Lint fix * Addressed comments * Make development section more robust. * Removed the flex hardcode in log message * Fixing Page Tool * Fixing Linter * Updating the Page tool * Fix eslint discoverability in the monorepo (@W-19068681@) (#2927) * Attempt at fixing eslint discoverability in the monorepo * Support other packages * Another approach: centralize the eslint dependencies * Add a script to sync eslint stuffs to the root * Update package lock files * Move timing of script to preinstall * Update package lock files * No need for this documentation * Empty commit * Simplify the script's logic * Reverting changes for Page tool * Added comment back * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * Fix link * Reverting the test change * Update package description * Remove folder structure section * @W-19179026: disable streaming responses (#2964) * Explicitly added example of what the path to your project might look like. * Update packages/pwa-kit-mcp/README.md Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Signed-off-by: Ben Chypak <bchypak@mobify.com> * @W-19248293: logMCPMessage is broken * @W-19248293: logMCPMessage is broken * fix lint errors * Committing for converting the createNewcomponent to use prompts instead of sessions and state * Committing for server.js * Committing for server.js * Committing for server.js * Review comments * @W-19251796 MCP a11y performance tool format fix (#3003) * Committing for unit tests * @W-19251739 fix create-new-page-tool components import path * @W-19183433: Add code owners validation to the CI pipeline (#2939) * Update codeowners * Update codeowners * Update codeowners * Add codeowners validator to the pipeline * codeowners validator * codeowners validator * codeowners validator * codeowners validator * codeowners validator * codeowners validator --------- Co-authored-by: Brian Feister <47546998+bfeister@users.noreply.github.com> * fix import when extensible is on * update change log * Initial Commit * remove bug fix change logs * add inputs for absoulte path and not rely on env variables * Normalize path separators to forward slashes for ES6 imports * Extra check to disallow trusted-system request from proxy * Added GIT version control MCP tool * Initial Commit * Review comments * Fixing tests * Review comments * Review comments * Update CHANGELOG.md * Fix test description * Move the statements around * Test updates * Update the string so that we can explicitly catch /trusted-system/token * Add robots.txt to mrt-reference-app. * Align versions with develop branch expectations * Update CHANGELOG.md * Move trusted agent exception above the generic case * Create agent_checkout_rebase_action.yml (#3027) Signed-off-by: Nishant Sethunath <nsethunath+@salesforce.com> * [CI workflow] automate generating, configurating, and deploying build from `develop` branch (@W-19170135@) (#3058) * Add new performance metrics workflow * Add comment * Disable some steps that are not needed * Update todos * Generate the project * Avoid dirtying workspace and remove unnecessary step * Tweak parameters * Allow for internal short codes * Align with the order of answers to the extensibility question * Create update-csp-directives.js * Rename script for clarity * Schedule it to run before the performance tests * Move constant into the config file * Move CSP directives into the config file * Make sure the corresponding .hbs files are up to date * Now scripts looks for the config file * Fix linting errors * Add auto lint fixing * For backward compatibility * New step to add CSP directives * Log where the file is at * Add a new script * Address a few todos * Allow updating property with the same value * Finish and clean up the workflow * Move scripts and remove default value for config path * No longer assume default value for config path And no longer preserving comments * No longer support null, undefined values * Delete unnecessary comments * Revert changes in retail-react-app * Create a new generator preset * Revert changes to the generator * Add csp directives to ssr.js.hbs * Update app/constants.js files to support the new preset * No longer needing these scripts * Workflow now uses the new generator preset * No need to validate app in this case * Add the preset to more files * Revert some changes and keep one change * Delete extra space * Empty commit * Simplify the handlebar template logic * No more hardcoding the `generated-projects` path * Move feature toggle for partial hydration into the config file * Remove unnecessary tests * Update CHANGELOG.md * Make sure all ssr.js related files are in sync * Fix linting error I wanted to preserve the comma at the end of the line because otherwise, I'm worried that it's easy to overlook it later. --------- Co-authored-by: Jainam Sheth <j.sheth@salesforce.com> * Remove specific user not found message * @W-18905383@ Decouple lint and bundle size GA workflows (#3084) * Extract lint and bundle size workflows * test: lower bundle size limit to test CI failure This is a minimal change to verify the new bundle-size workflow correctly fails when bundle size exceeds limits. Will be reverted. * revert: restore original bundle size limit to 62 kB Reverts the test change that lowered the bundle size limit from 62 kB to 50 kB. The CI workflow decoupling test was successful. * test: add unused variable to trigger lint error Added an unused variable to test that the lint workflow fails correctly while the test workflow continues to run independently. * fix: remove test lint error Removed the unused variable that was added to test lint workflow failure. The lint workflow decoupling test was successful. * test: add undefined variable to trigger actual lint error Added undefined variable reference that causes ESLint 'no-undef' error, not just a warning. This should cause the lint workflow to fail. * revert: restore main.jsx to original clean state Removed both the unused variable and undefined variable that were added for testing lint workflow failure. File is now back to original state. * clean: remove unused IS_NOT_FORK env variable from bundle-size workflow The IS_NOT_FORK environment variable was defined but never used in any conditional statements within the bundle-size workflow. Removing it simplifies the workflow and allows bundle size checks to run on all PRs including those from forks, which is beneficial for code quality. * clean: remove unused IS_NOT_FORK env variable from lint workflow The IS_NOT_FORK environment variable was defined but never used in any conditional statements within the lint workflow. Removing it simplifies the workflow and allows linting checks to run on all PRs including those from forks, which is beneficial for code quality. * Modify user not found responses from SLAS * Make the mcp server indipendent * User not found returns 200 * Handling for responses with no body * CI performance workflow: fix the deploy step (@W-19170135@) (#3091) * CI perf workflow: fix the deploy step Override the location of the .mobify credential file * More robust fix * Refactor the flags * Add whitespace * Update agent_checkout_rebase_action.yml Signed-off-by: Nishant Sethunath <nsethunath+@salesforce.com> * Update agent_checkout_rebase_action.yml Signed-off-by: Nishant Sethunath <nsethunath+@salesforce.com> * Fix how 403s are sent now that selfHandleResponse is true * Add test * Remove unused message * Changelog updates * Update translations * Remove test case that is no longer needed * Update agent_checkout_rebase_action.yml Signed-off-by: Nishant Sethunath <nsethunath+@salesforce.com> * Minor Cleanup * CI perf workflow: fix the deploy step.. take two (@W-19345469@) (#3115) * CI perf workflow: fix the deploy step Override the location of the .mobify credential file * More robust fix * Refactor the flags * Add whitespace * Update credentials * Add Slack notification * Apply feedback * lint * Lockdown chakra-ui version to 2.6.0 * Update changelog * Pin v2.7.0 * Bump vendor bundle size * W-19396339 add back in tests that were accidentally removed in conflict * W-19396339 lint fix * W-19396339 package size --------- Signed-off-by: Ben Chypak <bchypak@mobify.com> Signed-off-by: Jainam Sheth <99490559+shethj@users.noreply.github.com> Signed-off-by: Nishant Sethunath <nsethunath+@salesforce.com> Co-authored-by: vcua-mobify <vcua@salesforce.com> Co-authored-by: Ben Chypak <bchypak@salesforce.com> Co-authored-by: Ben Chypak <bchypak@mobify.com> Co-authored-by: Shailesh Zirpe <szirpe+sf@salesforce.com> Co-authored-by: Jainam Sheth <j.sheth@salesforce.com> Co-authored-by: Jainam Sheth <99490559+shethj@users.noreply.github.com> Co-authored-by: vcua-mobify <47404250+vcua-mobify@users.noreply.github.com> Co-authored-by: Alex Vuong <alex.vuong@salesforce.com> Co-authored-by: Shailesh Zirpe <42553862+szirpesf@users.noreply.github.com> Co-authored-by: wei-liu <wei.liu@salesforce.com> Co-authored-by: atekur <atekur@salesforce.com> Co-authored-by: Aditya Tekur <126732792+aditek-sf@users.noreply.github.com> Co-authored-by: Ujwala <59447810+unandyala@users.noreply.github.com> Co-authored-by: Avinash Kasipathy <akasipathy@salesforce.com> Co-authored-by: snilakandan <snilakandan@salesforce.com> Co-authored-by: Vincent Marta <vmarta@salesforce.com> Co-authored-by: Katia Hage <k.n.hage@salesforce.com> Co-authored-by: snilakandan13 <119348013+snilakandan13@users.noreply.github.com> Co-authored-by: patricksullivansf <100441292+patricksullivansf@users.noreply.github.com> Co-authored-by: Yuming Hsieh <yhsieh@salesforce.com> Co-authored-by: Brian Feister <47546998+bfeister@users.noreply.github.com> Co-authored-by: jitendra.bothra <jitendra.bothra@salesforce.com> Co-authored-by: jbothra-sf <152039392+jbothra-sf@users.noreply.github.com> Co-authored-by: Nishant Sethunath <nsethunath+@salesforce.com> Co-authored-by: Adam Raya <adamraya@users.noreply.github.com>
1 parent 3f34454 commit 55126ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+3013
-1412
lines changed

.github/actions/e2e_generate_app/action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,24 @@ inputs:
1010
required: false
1111
type: string
1212

13+
outputs:
14+
project_path:
15+
description: Path to the generated project directory
16+
value: ${{ steps.generate_project.outputs.project_path }}
17+
1318
runs:
1419
using: composite
1520
steps:
1621
- name: Generate new project based on project-key
22+
id: generate_project
1723
run: |
1824
COMMAND="node e2e/scripts/generate-project.js --project-key ${{ inputs.PROJECT_KEY }}"
1925
if [[ -n "${{ inputs.TEMPLATE_VERSION }}" ]]; then
2026
COMMAND="$COMMAND --templateVersion ${{ inputs.TEMPLATE_VERSION }}"
2127
fi
2228
$COMMAND
29+
30+
# Return path to the generated project
31+
GENERATED_PROJECTS_DIR=$(node -e "console.log(require('./e2e/config.js').GENERATED_PROJECTS_DIR)")
32+
echo "project_path=$GENERATED_PROJECTS_DIR/${{ inputs.PROJECT_KEY }}" >> $GITHUB_OUTPUT
2333
shell: bash

.github/actions/generate_app/action.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ inputs:
2222
project_dir:
2323
description: Project Directory
2424

25+
outputs:
26+
project_path:
27+
description: Path to the generated project directory
28+
value: ${{ steps.generate_project.outputs.project_path }}
29+
2530
runs:
2631
using: composite
2732
steps:
@@ -31,20 +36,20 @@ runs:
3136
run: |
3237
use_extensibility_input="${{ inputs.use_extensibility }}"
3338
if [ "use_extensibility_input" = "true" ]; then
34-
use_extensibility_value=2
35-
else
3639
use_extensibility_value=1
40+
else
41+
use_extensibility_value=2
3742
fi
38-
echo "USE_EXTENSIBILITY_VALUE=$use_extensibility_value" >> $GITHUB_ENV
39-
43+
echo "USE_EXTENSIBILITY_VALUE=$use_extensibility_value" >> $GITHUB_ENV
44+
4045
is_private_client_input="${{ inputs.is_private_client }}"
4146
if [ "$is_private_client_input" = "true" ]; then
4247
is_private_client_value=1
4348
else
4449
is_private_client_value=2
4550
fi
4651
echo "IS_PRIVATE_CLIENT_VALUE=$is_private_client_value" >> $GITHUB_ENV
47-
52+
4853
setup_hybrid_input="${{ inputs.setup_hybrid }}"
4954
if [ "$setup_hybrid_input" = "true" ]; then
5055
setup_hybrid_value=2
@@ -53,6 +58,8 @@ runs:
5358
fi
5459
echo "SETUP_HYBRID_VALUE=$setup_hybrid_value" >> $GITHUB_ENV
5560
61+
# TODO: update this to use the standard input feature that Ben created recently
62+
# TODO: this action does not finish successfully because of a dirty-workspace error, due to creating this generator-responses.json
5663
- name: Build project generator inputs
5764
id: build_generator_inputs
5865
shell: bash
@@ -107,11 +114,16 @@ runs:
107114
run: |
108115
cat generator-responses.json
109116
node e2e/scripts/generate-project.js --project-config "$(jq -c . generator-responses.json)"
117+
118+
# Return path to the generated project
119+
GENERATED_PROJECTS_DIR=$(node -e "console.log(require('./e2e/config.js').GENERATED_PROJECTS_DIR)")
120+
echo "project_path=$GENERATED_PROJECTS_DIR/${{ inputs.project_dir }}" >> $GITHUB_OUTPUT
110121
shell: bash
111122

123+
# TODO: I think we can safely delete this step. We already install the dependencies in the previous step.
112124
- name: Build generated project
113125
id: build_generated_project
114-
working-directory: ../generated-projects/${{ inputs.project_dir }}
126+
working-directory: ${{ steps.generate_project.outputs.project_path }}
115127
run: |-
116128
npm ci
117129
npm run build

.github/actions/push_to_mrt/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,26 @@ inputs:
66
TARGET:
77
description: MRT target environment
88
FLAGS:
9-
description: Push flags
9+
description: The rest of the flags for the push command
1010
PROJECT:
1111
description: MRT target project
1212
default: "scaffold-pwa"
1313
MESSAGE:
1414
description: Bundle message / name
1515
default: "build ${{ github.run_id }} on ${{ github.ref }} (${{ github.sha }})"
16+
CLOUD_ORIGIN:
17+
description: 'MRT Cloud origin'
18+
default: 'https://cloud.mobify.com'
19+
CREDENTIALS_FILE_PATH:
20+
description: 'Path to the credentials file'
21+
default: '~/.mobify'
1622
runs:
1723
using: composite
1824
steps:
1925
- name: Push Bundle to MRT
2026
run: |-
2127
cd ${{ inputs.CWD }}
2228
if [[ ${{ inputs.TARGET }} ]]; then
23-
npm run push -- -s ${{ inputs.PROJECT }} --message "${{ inputs.MESSAGE }}" --target ${{ inputs.TARGET }} ${{ inputs.FLAGS }}
29+
npm run push -- --projectSlug ${{ inputs.PROJECT }} --message "${{ inputs.MESSAGE }}" --target ${{ inputs.TARGET }} --cloud-origin ${{ inputs.CLOUD_ORIGIN }} --credentialsFile ${{ inputs.CREDENTIALS_FILE_PATH }} ${{ inputs.FLAGS }}
2430
fi
2531
shell: bash
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# .github/workflows/rebase-express-payments.yml
2+
3+
name: 'Auto Rebase adyenExpressPayments'
4+
5+
# This action will trigger on the creation of new preview release tags
6+
on:
7+
push:
8+
tags:
9+
- '*-preview'
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
15+
jobs:
16+
rebase:
17+
name: Rebase adyenExpressPayments on preview release
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
# Step 1: Check out the repository's code.
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0 # Fetches all history for all branches and tags
26+
27+
# Step 2: Set up the Node.js environment to use npm and npx.
28+
- name: Set up Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: '22' # Or your project's specific Node.js version
32+
cache: 'npm' # Caches npm dependencies for faster runs
33+
34+
# Step 3: Configure Git with a user name and email.
35+
- name: Set up Git
36+
run: |
37+
git config --global user.name 'GitHub Actions'
38+
git config --global user.email 'actions@github.com'
39+
40+
# Step 4: Switch to the adyenExpressPayments branch.
41+
- name: Switch to adyenExpressPayments branch
42+
run: git checkout adyenExpressPayments
43+
44+
# Step 5: Delete all package-lock.json files before the rebase.
45+
- name: Delete package-lock.json files
46+
run: |
47+
find . -name "package-lock.json" -type f -delete
48+
# We must commit this change so the rebase can proceed cleanly.
49+
# The 'if' statement prevents an error if no lock files were found.
50+
if [[ -n $(git status -s) ]]; then
51+
git add .
52+
git commit -m "chore: remove package-lock.json files before rebase and regenerating after"
53+
else
54+
echo "No package-lock.json files found to delete."
55+
fi
56+
57+
# Step 6: Attempt to rebase the branch. If this step fails, we abort the rebase and
58+
# return the branch to its original state
59+
- name: Rebase adyenExpressPayments with develop
60+
run: |
61+
TRIGGERING_TAG="${{ github.ref_name }}"
62+
echo "🔄 Rebasing branch 'adyenExpressPayments' onto tag '$TRIGGERING_TAG'"
63+
64+
if ! git rebase $TRIGGERING_TAG; then
65+
echo "Rebase failed due to conflicts. Aborting."
66+
git rebase --abort
67+
exit 1
68+
fi
69+
70+
# Step 7: Install dependencies after a successful rebase.
71+
# The '--yes' flag for lerna is crucial for non-interactive environments.
72+
- name: Install Dependencies
73+
run: |
74+
if ! npx lerna clean --yes && npm i; then
75+
echo "Generating package-lock files after rebase failed!"
76+
exit 1
77+
fi
78+
79+
# Step 8: Push the changes only if all previous steps were successful.
80+
- name: Push Changes
81+
run: |
82+
git add .
83+
git commit --amend --no-edit
84+
git push origin adyenExpressPayments --force-with-lease
85+
86+
# Step 9: This notification step will run if any of the above steps fail.
87+
- name: Notify on Failure
88+
if: failure()
89+
uses: slackapi/slack-github-action@v1.26.0
90+
with:
91+
# The channel or user ID to send the notification to.
92+
channel-id: '${{ secrets.AGENT_CHECKOUT_ALERT_SLACK_CHANNEL_ID }}'
93+
# A custom message for the Slack notification.
94+
slack-message: "🚨 Automatic rebase of `adyenExpressPayments` failed. Manual intervention is required. Link to failed action: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
95+
env:
96+
# You must store your Slack Bot Token as a secret in your repository settings.
97+
SLACK_BOT_TOKEN: '${{ secrets.AGENT_CHECKOUT_SLACK_BOT_TOKEN }}'

.github/workflows/bundle-size.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# WARNING! Conditionals are set as variables to minimize repetitive checks.
2+
# However, this results in the variables being the *string* values "true" or "false".
3+
# As a result, you must always explicitly check for those strings. For example,
4+
# ${{ env.DEVELOP }} will ALWAYS evaluate as true; to achieve the expected result
5+
# you must check ${{ env.DEVELOP == 'true' }}. There's probably a better way to DRY,
6+
# but this is what we have for now.
7+
8+
name: SalesforceCommerceCloud/pwa-kit/bundle-size
9+
on:
10+
pull_request: # Default: opened, reopened, synchronize (head branch updated)
11+
merge_group: # Trigger GA workflow when a pull request is added to a merge queue.
12+
push:
13+
branches:
14+
- develop
15+
- 'release-*'
16+
17+
jobs:
18+
pwa-kit-bundle-size:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 22 # Use latest LTS version for bundle size check
28+
cache: npm
29+
30+
- name: Setup Ubuntu Machine
31+
uses: "./.github/actions/setup_ubuntu"
32+
33+
- name: Run bundlesize test
34+
uses: "./.github/actions/bundle_size_test"
35+

.github/workflows/deploy_latest_release.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ jobs:
1313
runs-on: ubuntu-latest
1414
outputs:
1515
IS_LATEST_RELEASE: ${{ steps.checkRelease.outputs.IS_LATEST_RELEASE }}
16-
steps:
16+
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v4
1919

2020
- name: Check if latest release
2121
uses: ./.github/actions/check_if_latest_release
2222
with:
2323
token: ${{ secrets.GITHUB_TOKEN }}
24-
24+
2525
- name: Update Github Outputs
2626
id: checkRelease
2727
run: |-
@@ -45,13 +45,15 @@ jobs:
4545
project: pwa-kit
4646
mobify_user: MOBIFY_STG_CLIENT_USER
4747
mobify_api_key: MOBIFY_STG_CLIENT_API_KEY
48-
flags: --cloud-origin https://cloud-testing.mobify-staging.com -c ~/.mobify --wait
48+
cloud_origin: https://cloud-testing.mobify-staging.com
49+
flags: --wait
4950
- name: demo-site
5051
project_key: retail-react-app-demo-site
5152
target: production
5253
project: scaffold-pwa
5354
mobify_user: MOBIFY_CLIENT_USER
5455
mobify_api_key: MOBIFY_CLIENT_API_KEY
56+
cloud_origin: https://cloud.mobify.com
5557
flags: --wait
5658
steps:
5759
- name: Checkout
@@ -70,6 +72,7 @@ jobs:
7072
node ./scripts/gtime.js monorepo_install npm ci
7173
7274
- name: Generate Retail App Demo
75+
id: generate_app
7376
uses: ./.github/actions/e2e_generate_app
7477
with:
7578
PROJECT_KEY: ${{ matrix.environment.project_key }}
@@ -94,8 +97,9 @@ jobs:
9497
- name: Push Bundle to MRT (${{matrix.environment.name}})
9598
uses: "./.github/actions/push_to_mrt"
9699
with:
97-
CWD: "../generated-projects/${{ matrix.environment.project_key }}"
100+
CWD: ${{ steps.generate_app.outputs.project_path }}
98101
TARGET: ${{ matrix.environment.target }}
99102
PROJECT: ${{ matrix.environment.project }}
100103
MESSAGE: ${{ env.BUNDLE_NAME }})
104+
CLOUD_ORIGIN: ${{ matrix.environment.cloud_origin }}
101105
FLAGS: ${{ matrix.environment.flags }}

.github/workflows/e2e-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
echo "retail_app_template_version=$version" >> "$GITHUB_ENV"
6565
6666
- name: Generate Retail App Private Client
67+
id: generate_app
6768
if: ${{ env.SKIP_WORKFLOW != 'true' }}
6869
uses: ./.github/actions/e2e_generate_app
6970
with:
@@ -89,7 +90,7 @@ jobs:
8990
if: ${{ env.SKIP_WORKFLOW != 'true' }}
9091
uses: './.github/actions/push_to_mrt'
9192
with:
92-
CWD: '../generated-projects/retail-app-no-ext'
93+
CWD: ${{ steps.generate_app.outputs.project_path }}
9394
# TODO: Use the MRT target ID from the target lock step above.
9495
TARGET: e2e-tests-pwa-kit
9596
FLAGS: --wait

.github/workflows/e2e.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ jobs:
114114
echo "retail_app_template_version=$version" >> "$GITHUB_ENV"
115115
116116
- name: Generate Retail App Without Extensibility
117+
id: generate_app_no_ext
117118
uses: ./.github/actions/e2e_generate_app
118119
with:
119120
PROJECT_KEY: "retail-app-no-ext"
@@ -134,7 +135,7 @@ jobs:
134135
- name: Push Bundle to MRT (E2E Test PWA Kit)
135136
uses: "./.github/actions/push_to_mrt"
136137
with:
137-
CWD: "../generated-projects/retail-app-no-ext"
138+
CWD: ${{ steps.generate_app_no_ext.outputs.project_path }}
138139
TARGET: e2e-tests-pwa-kit
139140
FLAGS: --wait
140141

@@ -231,6 +232,7 @@ jobs:
231232
echo "retail_app_template_version=$version" >> "$GITHUB_ENV"
232233
233234
- name: Generate Retail App With Extensibility
235+
id: generate_app_ext
234236
uses: ./.github/actions/e2e_generate_app
235237
with:
236238
PROJECT_KEY: "retail-app-ext"
@@ -251,7 +253,7 @@ jobs:
251253
- name: Push Bundle to MRT (E2E Test PWA Kit)
252254
uses: "./.github/actions/push_to_mrt"
253255
with:
254-
CWD: "../generated-projects/retail-app-ext"
256+
CWD: ${{ steps.generate_app_ext.outputs.project_path }}
255257
TARGET: e2e-tests-pwa-kit
256258
FLAGS: --wait
257259

@@ -346,6 +348,7 @@ jobs:
346348
echo "retail_app_template_version=$version" >> "$GITHUB_ENV"
347349
348350
- name: Generate Retail App Private Client
351+
id: generate_app_private_client
349352
uses: ./.github/actions/e2e_generate_app
350353
with:
351354
PROJECT_KEY: "retail-app-private-client"
@@ -366,7 +369,7 @@ jobs:
366369
- name: Push Bundle to MRT
367370
uses: "./.github/actions/push_to_mrt"
368371
with:
369-
CWD: "../generated-projects/retail-app-private-client"
372+
CWD: ${{ steps.generate_app_private_client.outputs.project_path }}
370373
TARGET: e2e-pwa-kit-private
371374
FLAGS: --wait
372375

0 commit comments

Comments
 (0)