Skip to content

[pull] trunk from shopware:trunk #6

[pull] trunk from shopware:trunk

[pull] trunk from shopware:trunk #6

Workflow file for this run

name: Admin checks and tests
on:
pull_request:
paths:
- src/Administration/Resources/app/administration/**/*
- .github/workflows/admin.yml
workflow_dispatch:
workflow_call:
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
COMPOSER_ROOT_VERSION: 6.6.9999999-dev
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: Setup Shopware
uses: shopware/setup-shopware@main
with:
install-admin: true
shopware-version: ${{ github.ref }}
shopware-repository: ${{ github.repository }}
- name: Cache ESLint and Stylelint
uses: actions/cache@v4
with:
path: |
src/Administration/Resources/app/administration/node_modules/.eslintcache
src/Administration/Resources/app/administration/node_modules/.stylelintcache
key: admin-lint-${{ runner.os }}-6.6
- name: Lint
working-directory: src/Administration/Resources/app/administration
run: npm run lint
- name: Lint types
working-directory: src/Administration/Resources/app/administration
run: npm run lint:types
- name: Lint scss
working-directory: src/Administration/Resources/app/administration
run: npm run lint:scss
admin:
runs-on: ubuntu-24.04
name: "Jest Admin"
strategy:
matrix:
test-type:
- unit
- unit:disabled-compat
env:
APP_ENV: prod
DATABASE_URL: mysql://root:root@database:3306/root
APP_URL: http://localhost:8000
APP_SECRET: def00000bb5acb32b54ff8ee130270586eec0e878f7337dc7a837acc31d3ff00f93a56b595448b4b29664847dd51991b3314ff65aeeeb761a133b0ec0e070433bff08e48
OPENSEARCH_URL: elasticsearch:9200
BLUE_GREEN_DEPLOYMENT: 1
steps:
- name: Setup Shopware
uses: shopware/setup-shopware@main
with:
install-admin: true
shopware-version: ${{ github.ref }}
shopware-repository: ${{ github.repository }}
- name: Run Jest Admin ${{ matrix.test-type }}
run: npm --prefix src/Administration/Resources/app/administration run ${{ matrix.test-type }} -- --silent
license-check:
runs-on: ubuntu-24.04
name: "License check"
env:
WHITELISTED_JS_PACKAGES: '[email protected];administration;[email protected]'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: package*.json changed
id: changed-package-json
uses: tj-actions/changed-files@v45
with:
files: src/Administration/Resources/app/administration/package*.json
- uses: actions/setup-node@v4
if: steps.changed-package-json.outputs.any_changed == 'true'
with:
node-version: 20
- name: install packages
if: steps.changed-package-json.outputs.any_changed == 'true'
working-directory: src/Storefront/Resources/app/storefront
run: |
npm ci
- name: Check license
if: steps.changed-package-json.outputs.any_changed == 'true'
working-directory: src/Administration/Resources/app/administration
run: |
npx license-checker-rseidelsohn \
--onlyAllow "$(tr \\n \; < ${{ github.workspace }}/.allowed-licenses)" \
--excludePackages "${WHITELISTED_JS_PACKAGES}" \
--excludePrivatePackages