Skip to content

refactor(sm): further cleanup #669

refactor(sm): further cleanup

refactor(sm): further cleanup #669

Workflow file for this run

name: Playwright Tests
on:
push:
branches:
- main
- master
- develop
paths:
- "starters/**"
pull_request:
paths:
- "starters/**"
workflow_dispatch:
jobs:
check-changes:
runs-on: ubuntu-latest
outputs:
meilisearch: ${{ steps.filter.outputs.meilisearch }}
algolia: ${{ steps.filter.outputs.algolia }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
shopify-meilisearch:
- 'starters/shopify-meilisearch/**'
shopify-algolia:
- 'starters/shopify-algolia/**'
test:
needs: check-changes
strategy:
matrix:
app:
[
{
name: shopify-meilisearch,
working-directory: ./starters/shopify-meilisearch,
should-run: needs.check-changes.outputs.shopify-meilisearch,
},
{
name: shopify-algolia,
working-directory: ./starters/shopify-algolia,
should-run: needs.check-changes.outputs.shopify-algolia,
},
]
if: ${{ fromJson(matrix.app.should-run) }}

Check failure on line 49 in .github/workflows/playwright.yml

View workflow run for this annotation

GitHub Actions / Playwright Tests

Invalid workflow file

The workflow is not valid. .github/workflows/playwright.yml (Line: 49, Col: 9): Unrecognized named-value: 'matrix'. Located at position 10 within expression: fromJson(matrix.app.should-run)
environment: test
name: E2E Tests (${{ matrix.app.name }})
env:
NODE_ENV: test
SKIP_ENV_VALIDATION: true
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
SHOPIFY_STOREFRONT_ACCESS_TOKEN: ${{ secrets.SHOPIFY_STOREFRONT_ACCESS_TOKEN }}
SHOPIFY_ADMIN_ACCESS_TOKEN: ${{ secrets.SHOPIFY_ADMIN_ACCESS_TOKEN }}
SHOPIFY_STORE_DOMAIN: ${{ secrets.SHOPIFY_STORE_DOMAIN }}
MEILISEARCH_ADMIN_KEY: ${{ secrets.MEILISEARCH_ADMIN_KEY }}
MEILISEARCH_HOST: ${{ secrets.MEILISEARCH_HOST }}
SHOPIFY_APP_API_SECRET_KEY: ${{ secrets.SHOPIFY_APP_API_SECRET_KEY }}
REPLICATE_API_KEY: ${{ secrets.REPLICATE_API_KEY }}
FLAGS_SECRET: EAMwX-AhlPipEaZfTc-24bxAZ7BvLikwuIV2Zq7FP64
timeout-minutes: 60
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ matrix.app.name }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- run: echo "node_version=$(cat .github/nodejs.version)" >> $GITHUB_ENV
- name: "use node ${{ env.node_version }}"
uses: actions/setup-node@v3
with:
node-version: "${{ env.node_version }}"
- uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ matrix.app.name }}-playwright-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile --prefer-offline
working-directory: ${{ matrix.app.working-directory }}
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
working-directory: ${{ matrix.app.working-directory }}
- name: Run Playwright tests
run: yarn e2e
working-directory: ${{ matrix.app.working-directory }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report-${{ matrix.app.name }}
path: ${{ matrix.app.working-directory }}/playwright-report/
retention-days: 30