Skip to content

Commit 7e66bb9

Browse files
authored
release: fixes
- Fixed an issue with Meta Groups not applying to multiple categories - Fixed an issue where a meta group was not applied to products if it was attached before adding fields
2 parents 89cff19 + a238d3c commit 7e66bb9

25 files changed

+10410
-216
lines changed

.editorconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[*.js]
2+
charset = utf-8
3+
insert_final_newline = true
4+
end_of_line = lf
5+
indent_style = tab
6+
indent_size = 4

.github/workflows/create-build-zip.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,10 @@ jobs:
1919
steps:
2020
- name: Check out source files
2121
uses: actions/checkout@v4
22-
- name: Get Composer Cache Directory
23-
id: composer-cache
24-
run: |
25-
echo "::set-output name=dir::$(composer config cache-files-dir)"
26-
- name: Configure Composer cache
27-
uses: actions/cache@v1
22+
- uses: actions/setup-node@v4
2823
with:
29-
path: ${{ steps.composer-cache.outputs.dir }}
30-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
31-
restore-keys: |
32-
${{ runner.os }}-composer-
24+
node-version: "18"
25+
cache: "yarn"
3326
- name: Install composer deps
3427
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
3528
- name: Install yarn deps

.github/workflows/create-tag.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,16 @@ jobs:
1010
if: "! contains(github.event.head_commit.message, '[skip ci]')"
1111
strategy:
1212
matrix:
13-
node-version: [14.x]
13+
node-version: [18.x]
1414
steps:
1515
- uses: actions/checkout@master
1616
with:
1717
persist-credentials: false
1818
- name: Build files using ${{ matrix.node-version }}
19-
uses: actions/setup-node@v1
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version: ${{ matrix.node-version }}
22-
- name: Get yarn cache directory path
23-
id: yarn-cache-dir-path
24-
run: echo "::set-output name=dir::$(yarn cache dir)"
25-
- uses: actions/cache@v2
26-
id: yarn-cache
27-
with:
28-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
29-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30-
restore-keys: |
31-
${{ runner.os }}-yarn-
22+
cache: "yarn"
3223
- name: Release new version
3324
id: release
3425
run: |

.github/workflows/deploy-s3-store.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@master
13-
- name: Setup node 14
14-
uses: actions/setup-node@v1
13+
- name: Setup node 18
14+
uses: actions/setup-node@v4
1515
with:
16-
node-version: 14.x
17-
- name: Get yarn cache directory path
18-
id: yarn-cache-dir-path
19-
run: echo "::set-output name=dir::$(yarn cache dir)"
20-
- uses: actions/cache@v2
21-
id: yarn-cache
22-
with:
23-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
24-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
25-
restore-keys: |
26-
${{ runner.os }}-yarn-
16+
node-version: 18.x
17+
cache: "yarn"
2718
- name: Build & create dist/artifact
2819
run: |
2920
yarn install --frozen-lockfile
@@ -38,8 +29,8 @@ jobs:
3829
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DOWNLOADS }}
3930
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }}
4031
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }}
41-
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
42-
SOURCE_DIR: 'artifact' # optional: defaults to entire repository
32+
AWS_REGION: "us-west-1" # optional: defaults to us-east-1
33+
SOURCE_DIR: "artifact" # optional: defaults to entire repository
4334
DEST_DIR: ${{ secrets.S3_AWS_PRODUCTS_FOLDER }}/$BUILD_NAME/latest
4435
- name: Upload Tagged Version to S3
4536
uses: jakejarvis/s3-sync-action@master
@@ -49,8 +40,8 @@ jobs:
4940
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET_DOWNLOADS }}
5041
AWS_ACCESS_KEY_ID: ${{ secrets.S3_DOWNLOADS_AWS_ACCESS_KEY_ID }}
5142
AWS_SECRET_ACCESS_KEY: ${{ secrets.S3_DOWNLOADS_AWS_SECRET_ACCESS_KEY }}
52-
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
53-
SOURCE_DIR: 'artifact' # optional: defaults to entire repository
43+
AWS_REGION: "us-west-1" # optional: defaults to us-east-1
44+
SOURCE_DIR: "artifact" # optional: defaults to entire repository
5445
DEST_DIR: ${{ secrets.S3_AWS_PRODUCTS_FOLDER }}/$BUILD_NAME/$BUILD_VERSION
5546
- name: Send update to the store
5647
env:
@@ -59,4 +50,4 @@ jobs:
5950
STORE_URL: ${{ secrets.THEMEISLE_STORE_URL }}
6051
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
6152
BUILD_VERSION: ${{ env.BUILD_VERSION }}
62-
uses: Codeinwp/action-store-release@main
53+
uses: Codeinwp/action-store-release@main

.github/workflows/e2e.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: E2E Test
2+
3+
on:
4+
push:
5+
branches-ignore: master
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
9+
cancel-in-progress: true
10+
jobs:
11+
e2e:
12+
name: Playwright E2E tests
13+
strategy:
14+
fail-fast: false
15+
runs-on: ubuntu-22.04
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: "18"
21+
cache: "yarn"
22+
- name: Install NPM deps
23+
run: |
24+
yarn install --frozen-lockfile
25+
npm install -g playwright-cli
26+
npx playwright install --with-deps chromium
27+
- name: Install composer deps
28+
run: composer install --no-dev
29+
- name: Install environment
30+
run: |
31+
npm run wp-env start
32+
- name: Prepare Database
33+
run: bash ./bin/e2e-after-setup.sh
34+
- name: Run the tests
35+
run: |
36+
npm run test:e2e
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
39+
- name: Archive test results
40+
if: failure()
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: e2e-playwright-results
44+
path: artifacts
45+
retention-days: 1
46+
if-no-files-found: ignore

.github/workflows/test-php.yml

Lines changed: 18 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,30 @@ name: Test PHP
33
on:
44
push:
55
branches-ignore:
6-
- 'master'
6+
- "master"
77

88
jobs:
99
phpunit:
1010
name: Phpunit
1111
runs-on: ubuntu-22.04
12-
services:
13-
mysql:
14-
image: mysql:5.7
15-
env:
16-
MYSQL_ROOT_PASSWORD: root
17-
ports:
18-
- 3306/tcp
19-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
2012
steps:
21-
- name: Setup PHP version
22-
uses: shivammathur/setup-php@v2
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
2315
with:
24-
php-version: '7.2'
25-
extensions: simplexml, mysql
26-
tools: phpunit-polyfills
27-
- name: Checkout source code
28-
uses: actions/checkout@v2
29-
- name: Install WordPress Test Suite
16+
node-version: "18"
17+
cache: "yarn"
18+
- name: Install NPM deps
3019
run: |
31-
bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }}
32-
- name: Get Composer Cache Directory
33-
id: composer-cache
20+
yarn install --frozen-lockfile
21+
- name: Install composer deps
22+
run: composer install
23+
- name: Install environment
3424
run: |
35-
echo "::set-output name=dir::$(composer config cache-files-dir)"
36-
- name: Setup Composer cache
37-
uses: actions/cache@v1
38-
with:
39-
path: ${{ steps.composer-cache.outputs.dir }}
40-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
41-
restore-keys: |
42-
${{ runner.os }}-composer-
43-
- name: Install composer
44-
run: composer install --prefer-dist --no-progress --no-suggest
45-
- name: Run phpunit
46-
run: phpunit
25+
npm run wp-env start
26+
- name: Prepare Database
27+
run: bash ./bin/e2e-after-setup.sh
28+
- name: Run the tests
29+
run: |
30+
npm run test:unit:php
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ artifact
66
dist
77
vendor
88
languages/woocommerce-product-addon.pot
9-
*.log
9+
*.log
10+
artifacts
11+
.phpunit.result.cache

.wp-env.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"plugins": [
3+
"https://downloads.wordpress.org/plugin/woocommerce.9.3.3.zip",
4+
"."
5+
],
6+
"phpVersion": "8.1"
7+
}

0 commit comments

Comments
 (0)