Skip to content

Release MakePay Medusa plugin 1.0.0 #20

Release MakePay Medusa plugin 1.0.0

Release MakePay Medusa plugin 1.0.0 #20

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
quality:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node:
- 22
- 24
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: ${{ matrix.node }}
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Check package
run: npm run check
- name: Audit production dependencies
if: matrix.node == 24
run: npm audit --omit=dev --audit-level=high
medusa-package:
name: Packed plugin in Medusa 2.17.2
runs-on: ubuntu-latest
needs: quality
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: medusa_makepay_test
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d medusa_makepay_test"
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Build and install the packed artifact
env:
DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/medusa_makepay_test
run: npm run test:integration
storefront-e2e:
name: Packed Medusa storefront checkout
runs-on: ubuntu-latest
needs: medusa-package
timeout-minutes: 90
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: makepay_medusa_e2e
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U postgres -d makepay_medusa_e2e"
--health-interval 5s
--health-timeout 5s
--health-retries 10
postgres_api_key:
image: postgres:16-alpine
env:
POSTGRES_DB: makepay_api_key_e2e
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
ports:
- 5433:5432
options: >-
--health-cmd "pg_isready -U postgres -d makepay_api_key_e2e"
--health-interval 5s
--health-timeout 5s
--health-retries 10
steps:
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup Node.js
uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: 24
cache: npm
- name: Install dependencies
run: npm ci --ignore-scripts --no-audit --no-fund
- name: Verify E2E sanitizer and safety guards
run: node scripts/e2e-medusa.mjs --self-test-sanitizer
- name: Install Chromium
run: npx playwright install --with-deps chromium
- name: Exercise the packed storefront order
env:
CI: true
MAKEPAY_E2E_API_KEY_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5433/makepay_api_key_e2e
MAKEPAY_E2E_DATABASE_URL: postgresql://postgres:postgres@127.0.0.1:5432/makepay_medusa_e2e
run: |
test -d "$HOME/.npm"
test ! -L "$HOME/.npm"
test "$(stat -c '%u' "$HOME/.npm")" = "$(id -u)"
chmod 700 "$HOME/.npm"
MAKEPAY_E2E_NPM_CACHE_DIR="$HOME/.npm" npm run test:e2e:medusa
- name: Upload sanitized runtime logs
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: makepay-medusa-storefront-e2e
if-no-files-found: ignore
path: output/playwright/medusa-makepay/runtime/**/*.log
retention-days: 3