feat: align plugin and pipeline with Shopware guidelines #13
No files matched your search
@@ -20,7 +20,8 @@ jobs:
|
|||||||
node-version: '20'
|
node-version: '20'
|
||||||
- name: Install shopware-cli
|
- name: Install shopware-cli
|
||||||
run: |
|
run: |
|
||||||
curl -sL https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz | tar -xz -C /tmp shopware-cli
|
curl -fsSL --retry 5 --retry-delay 10 -o /tmp/swcli.tgz https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz
|
||||||
|
tar -xzf /tmp/swcli.tgz -C /tmp shopware-cli
|
||||||
sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli
|
sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli
|
||||||
- name: Validate extension
|
- name: Validate extension
|
||||||
run: shopware-cli extension validate .
|
run: shopware-cli extension validate .
|
||||||
@@ -36,7 +37,8 @@ jobs:
|
|||||||
node-version: '20'
|
node-version: '20'
|
||||||
- name: Install shopware-cli
|
- name: Install shopware-cli
|
||||||
run: |
|
run: |
|
||||||
curl -sL https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz | tar -xz -C /tmp shopware-cli
|
curl -fsSL --retry 5 --retry-delay 10 -o /tmp/swcli.tgz https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz
|
||||||
|
tar -xzf /tmp/swcli.tgz -C /tmp shopware-cli
|
||||||
sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli
|
sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli
|
||||||
- name: Package extension
|
- name: Package extension
|
||||||
run: shopware-cli extension package . --output-directory .build --filename package.zip --git-commit "$GITHUB_SHA"
|
run: shopware-cli extension package . --output-directory .build --filename package.zip --git-commit "$GITHUB_SHA"
|
||||||
@@ -55,6 +57,9 @@ jobs:
|
|||||||
|
|
||||||
phpunit:
|
phpunit:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# shivammathur/setup-php hangs on this runner, so PHP comes from Debian bookworm (8.2) via apt.
|
||||||
|
container:
|
||||||
|
image: node:20-bookworm
|
||||||
services:
|
services:
|
||||||
database:
|
database:
|
||||||
image: mariadb:11.4
|
image: mariadb:11.4
|
||||||
@@ -64,17 +69,16 @@ jobs:
|
|||||||
DATABASE_URL: mysql://root:root@database:3306/shopware
|
DATABASE_URL: mysql://root:root@database:3306/shopware
|
||||||
APP_ENV: test
|
APP_ENV: test
|
||||||
APP_URL: http://localhost
|
APP_URL: http://localhost
|
||||||
|
COMPOSER_MEMORY_LIMIT: '-1'
|
||||||
|
COMPOSER_ALLOW_SUPERUSER: '1'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: plugin-src
|
path: plugin-src
|
||||||
- uses: shivammathur/setup-php@v2
|
- name: Install PHP and tools
|
||||||
env:
|
run: |
|
||||||
runner: self-hosted # non-GitHub runner (act): without this setup-php hangs
|
apt-get update -q
|
||||||
with:
|
apt-get install -y -q --no-install-recommends php-cli php-gd php-intl php-mysql php-zip php-curl php-mbstring php-xml php-bcmath composer unzip jq git ca-certificates
|
||||||
php-version: '8.3'
|
|
||||||
extensions: gd, intl, pdo_mysql, zip, curl, mbstring, dom, xml, fileinfo, sodium, bcmath
|
|
||||||
tools: composer
|
|
||||||
- name: Wait for the database
|
- name: Wait for the database
|
||||||
run: |
|
run: |
|
||||||
for i in $(seq 60); do
|
for i in $(seq 60); do
|
||||||
|
|||||||
@@ -50,7 +50,8 @@ jobs:
|
|||||||
- name: Install shopware-cli
|
- name: Install shopware-cli
|
||||||
if: steps.meta.outputs.skip == 'false'
|
if: steps.meta.outputs.skip == 'false'
|
||||||
run: |
|
run: |
|
||||||
curl -sL https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz | tar -xz -C /tmp shopware-cli
|
curl -fsSL --retry 5 --retry-delay 10 -o /tmp/swcli.tgz https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz
|
||||||
|
tar -xzf /tmp/swcli.tgz -C /tmp shopware-cli
|
||||||
sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli
|
sudo install /tmp/shopware-cli /usr/local/bin/shopware-cli || install /tmp/shopware-cli /usr/local/bin/shopware-cli
|
||||||
|
|
||||||
- name: Validate extension
|
- name: Validate extension
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ Jobs (all required checks on `main`):
|
|||||||
|
|
||||||
1. `validate` - install `shopware-cli`, `extension validate .` (hard gate, no `|| true`).
|
1. `validate` - install `shopware-cli`, `extension validate .` (hard gate, no `|| true`).
|
||||||
2. `package` - `extension package` with `--git-commit "$GITHUB_SHA"`, then assert the zip contains built admin JS (`Resources/public/administration/js`) when an admin entry exists.
|
2. `package` - `extension package` with `--git-commit "$GITHUB_SHA"`, then assert the zip contains built admin JS (`Resources/public/administration/js`) when an admin entry exists.
|
||||||
3. `phpunit` - `composer create-project shopware/production` (6.6.x) + MariaDB service, copy the plugin into `custom/plugins`, install/activate, run phpunit. PHP 8.3.
|
3. `phpunit` - `composer create-project shopware/production` (6.6.x) + MariaDB service, copy the plugin into `custom/plugins`, install/activate, run phpunit. PHP from the Debian bookworm container (8.2), because `shivammathur/setup-php` hangs on this runner.
|
||||||
|
|
||||||
### Release workflow (`.gitea/workflows/release.yml`)
|
### Release workflow (`.gitea/workflows/release.yml`)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user