diff --git a/.github/workflows/validate-js-functions.yml b/.github/workflows/validate-js-functions.yml index 5418b125..c0f84a51 100644 --- a/.github/workflows/validate-js-functions.yml +++ b/.github/workflows/validate-js-functions.yml @@ -24,3 +24,13 @@ jobs: run: yarn - name: Generate types run: yarn js-typegen + - name: Create app toml for Shopify CLI + run: | + cat > shopify.app.toml << 'EOF' + scopes = "" + extension_directories = ["functions-*-js"] + EOF + - name: Install Shopify CLI + run: npm install -g @shopify/cli@latest + - name: Run Wasm tests + run: yarn js-test diff --git a/.github/workflows/validate-rust-functions.yml b/.github/workflows/validate-rust-functions.yml index 5507a759..11446258 100644 --- a/.github/workflows/validate-rust-functions.yml +++ b/.github/workflows/validate-rust-functions.yml @@ -12,6 +12,7 @@ on: env: CARGO_TERM_COLOR: always + CARGO_TARGET_DIR: ${{ github.workspace }}/target jobs: checks: @@ -30,3 +31,15 @@ jobs: run: cargo test - name: Build with wasm32-unknown-unknown target run: cargo build --release --target wasm32-unknown-unknown + - name: Create app toml for Shopify CLI + run: | + cat > shopify.app.toml << 'EOF' + scopes = "" + extension_directories = ["functions-*-rs"] + EOF + - name: Install Shopify CLI + run: npm install -g @shopify/cli@latest + - name: Install test dependencies + run: yarn + - name: Run Wasm tests + run: yarn rs-test diff --git a/.github/workflows/validate-ts-functions.yml b/.github/workflows/validate-ts-functions.yml index 69405ace..247dd28b 100644 --- a/.github/workflows/validate-ts-functions.yml +++ b/.github/workflows/validate-ts-functions.yml @@ -24,3 +24,13 @@ jobs: run: yarn - name: Generate types run: yarn js-typegen + - name: Create app toml for Shopify CLI + run: | + cat > shopify.app.toml << 'EOF' + scopes = "" + extension_directories = ["functions-*-js"] + EOF + - name: Install Shopify CLI + run: npm install -g @shopify/cli@latest + - name: Run Wasm tests + run: yarn js-test diff --git a/functions-pickup-point-delivery-option-generators-js/src/run.liquid b/functions-pickup-point-delivery-option-generators-js/src/run.liquid index 1c4b2317..ca9f2e35 100644 --- a/functions-pickup-point-delivery-option-generators-js/src/run.liquid +++ b/functions-pickup-point-delivery-option-generators-js/src/run.liquid @@ -149,7 +149,7 @@ function buildPickupPointDeliveryOption(externalApiDeliveryPoint: any): PickupPo function buildProvider(): Provider { return { - name: "Shopify TypeScript Demo", + name: "Shopify Javascript Demo", logoUrl: "https://cdn.shopify.com/s/files/1/0628/3830/9033/files/shopify_icon_146101.png?v=1706120545", }; } diff --git a/package.json b/package.json index fe0b8cc3..25d38e89 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,9 @@ "scripts": { "expand-liquid": "node .github/scripts/expand-liquid.js", "js-typegen": "yarn workspaces run graphql-code-generator --config package.json", - "js-test": "yarn workspaces run test run", - "js-test:unit": "yarn workspaces run test:unit" + "js-test": "for dir in functions-*-js; do (cd \"$dir\" && npx vitest run); done", + "rs-test": "for dir in functions-*-rs; do (cd \"$dir\" && npx vitest run); done" }, "private": true, - "workspaces": ["functions-*-js"] + "workspaces": ["functions-*-js", "functions-*-rs"] } \ No newline at end of file