Skip to content

Commit

Permalink
Merge branch 'trunk' into 44614-update-homepage-templates
Browse files Browse the repository at this point in the history
  • Loading branch information
albarin committed Feb 16, 2024
2 parents e06d7c3 + 0ea64cf commit 9b46a03
Show file tree
Hide file tree
Showing 177 changed files with 3,648 additions and 947 deletions.
2 changes: 1 addition & 1 deletion .github/project-pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
'focus: documentation':
- docs/**/*

'tools: monorepo infrastructure':
'tool: monorepo infrastructure':
- .github/**/*
- bin/**/*
- tools/**/*
Expand Down
44 changes: 20 additions & 24 deletions .github/workflows/blocks-playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,27 @@ jobs:
run:
working-directory: plugins/woocommerce-blocks
strategy:
fail-fast: false
matrix:
config:
[
{
name: Normal,
file: playwright.config.ts,
resultPath: test-results,
},
{
name: Classic,
file: playwright.classic-theme.config.ts,
resultPath: test-results-classic-theme,
},
{
name: SideEffects,
file: playwright.side-effects.config.ts,
resultPath: test-results-side-effects,
},
{
name: BlockThemeWithTemplates,
file: playwright.block-theme-with-templates.config.ts,
resultPath: test-results-block-theme-with-templates,
},
]
- name: Normal
file: playwright.config.ts
resultPath: test-results
- name: Classic
file: playwright.classic-theme.config.ts
resultPath: test-results-classic-theme
- name: SideEffects
file: playwright.side-effects.config.ts
resultPath: test-results-side-effects
- name: BlockThemeWithTemplates
file: playwright.block-theme-with-templates.config.ts
resultPath: test-results-block-theme-with-templates
shards:
- name: 1/5
- name: 2/5
- name: 3/5
- name: 4/5
- name: 5/5
steps:
- uses: actions/checkout@v3

Expand All @@ -60,11 +57,10 @@ jobs:

- name: Run Playwright tests
working-directory: plugins/woocommerce-blocks
run: pnpm playwright test --config=tests/e2e/${{ matrix.config.file }}
run: pnpm playwright test --config=tests/e2e/${{ matrix.config.file }} --shard ${{ matrix.shards.name }}

- uses: actions/upload-artifact@v3
if: ${{ failure() }}

with:
name: playwright-report-${{ matrix.config.name }}
path: plugins/woocommerce-blocks/tests/e2e/artifacts/${{ matrix.config.resultPath }}
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/metrics.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@ name: Metrics Tracking

on:
pull_request:
paths-ignore:
- '**.md'
- '**/changelog/**'
- '**/.wireit/**'
- 'docs/**'
- 'plugins/woo-ai/**'
- 'plugins/woocommerce/.wordpress-org/**'
- 'plugins/woocommerce/i18n/**'
- 'plugins/woocommerce/tests/**'
- 'plugins/woocommerce-beta-tester/**'
- 'tools/**'
push:
branches: [trunk]

Expand Down
14 changes: 2 additions & 12 deletions .github/workflows/non-cot-pr-build-and-e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
name: Run tests against PR in an environment with HPOS disabled
on:
pull_request:
paths-ignore:
- '**.md'
- '**/changelog/**'
- '**/.wireit/**'
- 'docs/**'
- 'plugins/woo-ai/**'
- 'plugins/woocommerce/.wordpress-org/**'
- 'plugins/woocommerce/i18n/**'
- 'plugins/woocommerce-beta-tester/**'
- 'tools/**'
workflow_dispatch:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run daily tests in an environment with HPOS enabled
name: Run daily tests in an environment with HPOS disabled
on:
schedule:
- cron: '30 2 * * *'
Expand All @@ -15,7 +15,7 @@ jobs:
name: Runs E2E tests with HPOS enabled.
runs-on: ubuntu-20.04
permissions:
contents: read
contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-report
Expand All @@ -25,13 +25,13 @@ jobs:
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'

- name: Load docker images and start containers with HPOS enabled.
working-directory: plugins/woocommerce
env:
ENABLE_HPOS: 1
ENABLE_HPOS: 0
run: pnpm --filter=@woocommerce/plugin-woocommerce env:test:cot

- name: Download and install Chromium browser.
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
name: Runs API tests with HPOS enabled.
runs-on: ubuntu-20.04
permissions:
contents: read
contents: read
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-report
Expand All @@ -84,13 +84,13 @@ jobs:
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'

- name: Load docker images and start containers with HPOS enabled.
working-directory: plugins/woocommerce
env:
ENABLE_HPOS: 1
ENABLE_HPOS: 0
run: pnpm --filter=@woocommerce/plugin-woocommerce env:test:cot

- name: Run Playwright API tests.
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
)
runs-on: ubuntu-20.04
permissions:
contents: read
contents: read
needs: [hpos-api-tests-run, hpos-e2e-tests-run]
steps:
- name: Create dirs
Expand Down Expand Up @@ -175,31 +175,3 @@ jobs:
script: |
const script = require( './repo/.github/workflows/scripts/prepare-test-summary-daily.js' )
return await script( { core } )
publish-test-reports:
name: Publish test reports
if: |
always() &&
! github.event.pull_request.head.repo.fork &&
(
contains( needs.*.result, 'success' ) ||
contains( needs.*.result, 'failure' )
)
runs-on: ubuntu-20.04
needs: [hpos-api-tests-run, hpos-e2e-tests-run]
env:
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
RUN_ID: ${{ github.run_id }}
COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
steps:
- name: Publish test reports
env:
API_ARTIFACT: api-test-report---pr-${{ github.run_number }}
E2E_ARTIFACT: e2e-test-report---pr-${{ github.run_number }}
run: |
gh workflow run publish-test-reports-daily.yml \
-f run_id=$RUN_ID \
-f api_artifact=$API_ARTIFACT \
-f e2e_artifact=$E2E_ARTIFACT \
-f s3_root=public \
--repo woocommerce/woocommerce-test-reports
8 changes: 0 additions & 8 deletions .github/workflows/pr-build-and-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@ on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**.md'
- '**/changelog/**'
- '**/.wireit/**'
- 'docs/**'
- 'plugins/woo-ai/**'
- 'plugins/woocommerce/.wordpress-org/**'
- 'plugins/woocommerce/i18n/**'
- 'plugins/woocommerce-beta-tester/**'
- 'tools/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
108 changes: 54 additions & 54 deletions .github/workflows/smoke-test-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Load docker images and start containers.
working-directory: plugins/woocommerce
env:
ENABLE_HPOS: 0
ENABLE_HPOS: 1
run: pnpm --filter=@woocommerce/plugin-woocommerce env:test

- name: Run API tests
Expand Down Expand Up @@ -82,16 +82,16 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
shard:
[
{ number: 1, name: 1/5 },
{ number: 2, name: 2/5 },
{ number: 3, name: 3/5 },
{ number: 4, name: 4/5 },
{ number: 5, name: 5/5 },
]
fail-fast: false
matrix:
shard:
[
{ number: 1, name: 1/5 },
{ number: 2, name: 2/5 },
{ number: 3, name: 3/5 },
{ number: 4, name: 4/5 },
{ number: 5, name: 5/5 },
]
permissions:
contents: read
outputs:
Expand All @@ -112,6 +112,7 @@ jobs:
working-directory: plugins/woocommerce
env:
WP_ENV_PHP_VERSION: 7.4
ENABLE_HPOS: 1
run: pnpm env:test

- name: Download and install Chromium browser.
Expand All @@ -138,50 +139,49 @@ jobs:
path: ${{ env.ALLURE_RESULTS_DIR }}
retention-days: 1
compression-level: 9



merge-reports:
name: Merge e2e test reports
if: always()
needs: e2e-tests
runs-on: ubuntu-latest
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report
steps:
- uses: actions/checkout@v3
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'

- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: ${{ env.ALLURE_RESULTS_DIR }}
pattern: all-blob-reports-*
run-id: e2e-tests-run
merge-multiple: true

- name: Generate Test report.
id: generate_e2e_report
working-directory: plugins/woocommerce
run: pnpm exec allure generate --clean ${{ env.ALLURE_RESULTS_DIR }} --output ${{ env.ALLURE_REPORT_DIR }}

- name: Archive Playwright E2E test report
if: |
always() &&
steps.generate_e2e_report.conclusion == 'success'
uses: actions/upload-artifact@v4
with:
name: ${{ env.E2E_ARTIFACT }}
path: |
${{ env.ALLURE_RESULTS_DIR }}
${{ env.ALLURE_REPORT_DIR }}
if-no-files-found: ignore
retention-days: 5
name: Merge e2e test reports
if: always()
needs: e2e-tests

runs-on: ubuntu-latest
env:
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report
steps:
- uses: actions/checkout@v3
- name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'

- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: ${{ env.ALLURE_RESULTS_DIR }}
pattern: all-blob-reports-*
run-id: e2e-tests-run
merge-multiple: true

- name: Generate Test report.
id: generate_e2e_report
working-directory: plugins/woocommerce
run: pnpm exec allure generate --clean ${{ env.ALLURE_RESULTS_DIR }} --output ${{ env.ALLURE_REPORT_DIR }}

- name: Archive Playwright E2E test report
if: |
always() &&
steps.generate_e2e_report.conclusion == 'success'
uses: actions/upload-artifact@v4
with:
name: ${{ env.E2E_ARTIFACT }}
path: |
${{ env.ALLURE_RESULTS_DIR }}
${{ env.ALLURE_REPORT_DIR }}
if-no-files-found: ignore
retention-days: 5

k6-tests:
name: k6 tests on nightly build
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/smoke-test-pr-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@ on:
pull_request:
types:
- closed
paths-ignore:
- '**.md'
- '**/changelog/**'
- '**/.wireit/**'
- 'docs/**'
- 'plugins/woo-ai/**'
- 'plugins/woocommerce/.wordpress-org/**'
- 'plugins/woocommerce/i18n/**'
- 'plugins/woocommerce-beta-tester/**'
- 'tools/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
Expand Down
1 change: 0 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
* Tweak - Enable shipping suggestions API consumption [#42810](https://github.com/woocommerce/woocommerce/pull/42810)
* Tweak - Make the `useCampaigns` hook support being used with multiple instances. [#41211](https://github.com/woocommerce/woocommerce/pull/41211)
* Performance - Prevent second query used to determine real post count from running if paging isn't being used. [#40092](https://github.com/woocommerce/woocommerce/pull/40092)
* Enhancement - Add ability to register Checkbox fields in Checkout Block [#42780](https://github.com/woocommerce/woocommerce/pull/42780)
* Enhancement - Call to the store title endpoint to update the store title with an AI generated one [#41632](https://github.com/woocommerce/woocommerce/pull/41632)
* Enhancement - CYS - Reset products and pattern when the site doesn't have AI generated content. [#42970](https://github.com/woocommerce/woocommerce/pull/42970)
* Enhancement - CYS - select the right font with AI offline [#42973](https://github.com/woocommerce/woocommerce/pull/42973)
Expand Down

0 comments on commit 9b46a03

Please sign in to comment.