|
1
|
name: Commerce storefront checks |
|
2
|
|
|
3
|
on: |
|
4
|
pull_request: |
|
5
|
paths: |
|
6
|
- "commerce/**" |
|
7
|
- "docs/**" |
|
8
|
- ".github/workflows/commerce-checks.yml" |
|
9
|
push: |
|
10
|
branches: |
|
11
|
- "project/medusa-foundation-audit" |
|
12
|
paths: |
|
13
|
- "commerce/**" |
|
14
|
- "docs/**" |
|
15
|
- ".github/workflows/commerce-checks.yml" |
|
16
|
workflow_dispatch: |
|
17
|
|
|
18
|
permissions: |
|
19
|
contents: read |
|
20
|
|
|
21
|
jobs: |
|
22
|
storefront: |
|
23
|
runs-on: ubuntu-latest |
|
24
|
defaults: |
|
25
|
run: |
|
26
|
working-directory: commerce |
|
27
|
steps: |
|
28
|
- uses: actions/checkout@v4 |
|
29
|
- uses: actions/setup-node@v4 |
|
30
|
with: |
|
31
|
node-version: "22" |
|
32
|
- name: Install standalone storefront dependencies |
|
33
|
run: npm install --no-audit --no-fund |
|
34
|
- name: Run unit tests |
|
35
|
run: npm test |
|
36
|
- name: Typecheck and build |
|
37
|
run: npm run build |
|
38
|
- name: Validate standalone static Pages preview |
|
39
|
run: node scripts/validate-static-preview.mjs |