Remove test publishing (#44592)
This commit is contained in:
parent
83fc7a88f3
commit
c3b355a53f
|
@ -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:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '30 2 * * *'
|
- cron: '30 2 * * *'
|
||||||
|
@ -15,7 +15,7 @@ jobs:
|
||||||
name: Runs E2E tests with HPOS enabled.
|
name: Runs E2E tests with HPOS enabled.
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
env:
|
env:
|
||||||
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results
|
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results
|
||||||
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-report
|
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-report
|
||||||
|
@ -25,13 +25,13 @@ jobs:
|
||||||
- name: Setup WooCommerce Monorepo
|
- name: Setup WooCommerce Monorepo
|
||||||
uses: ./.github/actions/setup-woocommerce-monorepo
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||||
with:
|
with:
|
||||||
install: '@woocommerce/plugin-woocommerce...'
|
install: '@woocommerce/plugin-woocommerce...'
|
||||||
build: '@woocommerce/plugin-woocommerce'
|
build: '@woocommerce/plugin-woocommerce'
|
||||||
|
|
||||||
- name: Load docker images and start containers with HPOS enabled.
|
- name: Load docker images and start containers with HPOS enabled.
|
||||||
working-directory: plugins/woocommerce
|
working-directory: plugins/woocommerce
|
||||||
env:
|
env:
|
||||||
ENABLE_HPOS: 1
|
ENABLE_HPOS: 0
|
||||||
run: pnpm --filter=@woocommerce/plugin-woocommerce env:test:cot
|
run: pnpm --filter=@woocommerce/plugin-woocommerce env:test:cot
|
||||||
|
|
||||||
- name: Download and install Chromium browser.
|
- name: Download and install Chromium browser.
|
||||||
|
@ -74,7 +74,7 @@ jobs:
|
||||||
name: Runs API tests with HPOS enabled.
|
name: Runs API tests with HPOS enabled.
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
env:
|
env:
|
||||||
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-results
|
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
|
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-report
|
||||||
|
@ -84,13 +84,13 @@ jobs:
|
||||||
- name: Setup WooCommerce Monorepo
|
- name: Setup WooCommerce Monorepo
|
||||||
uses: ./.github/actions/setup-woocommerce-monorepo
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||||
with:
|
with:
|
||||||
install: '@woocommerce/plugin-woocommerce...'
|
install: '@woocommerce/plugin-woocommerce...'
|
||||||
build: '@woocommerce/plugin-woocommerce'
|
build: '@woocommerce/plugin-woocommerce'
|
||||||
|
|
||||||
- name: Load docker images and start containers with HPOS enabled.
|
- name: Load docker images and start containers with HPOS enabled.
|
||||||
working-directory: plugins/woocommerce
|
working-directory: plugins/woocommerce
|
||||||
env:
|
env:
|
||||||
ENABLE_HPOS: 1
|
ENABLE_HPOS: 0
|
||||||
run: pnpm --filter=@woocommerce/plugin-woocommerce env:test:cot
|
run: pnpm --filter=@woocommerce/plugin-woocommerce env:test:cot
|
||||||
|
|
||||||
- name: Run Playwright API tests.
|
- name: Run Playwright API tests.
|
||||||
|
@ -137,7 +137,7 @@ jobs:
|
||||||
)
|
)
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
needs: [hpos-api-tests-run, hpos-e2e-tests-run]
|
needs: [hpos-api-tests-run, hpos-e2e-tests-run]
|
||||||
steps:
|
steps:
|
||||||
- name: Create dirs
|
- name: Create dirs
|
||||||
|
@ -175,31 +175,3 @@ jobs:
|
||||||
script: |
|
script: |
|
||||||
const script = require( './repo/.github/workflows/scripts/prepare-test-summary-daily.js' )
|
const script = require( './repo/.github/workflows/scripts/prepare-test-summary-daily.js' )
|
||||||
return await script( { core } )
|
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
|
|
|
@ -39,7 +39,7 @@ jobs:
|
||||||
- name: Load docker images and start containers.
|
- name: Load docker images and start containers.
|
||||||
working-directory: plugins/woocommerce
|
working-directory: plugins/woocommerce
|
||||||
env:
|
env:
|
||||||
ENABLE_HPOS: 0
|
ENABLE_HPOS: 1
|
||||||
run: pnpm --filter=@woocommerce/plugin-woocommerce env:test
|
run: pnpm --filter=@woocommerce/plugin-woocommerce env:test
|
||||||
|
|
||||||
- name: Run API tests
|
- name: Run API tests
|
||||||
|
@ -82,16 +82,16 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
shard:
|
shard:
|
||||||
[
|
[
|
||||||
{ number: 1, name: 1/5 },
|
{ number: 1, name: 1/5 },
|
||||||
{ number: 2, name: 2/5 },
|
{ number: 2, name: 2/5 },
|
||||||
{ number: 3, name: 3/5 },
|
{ number: 3, name: 3/5 },
|
||||||
{ number: 4, name: 4/5 },
|
{ number: 4, name: 4/5 },
|
||||||
{ number: 5, name: 5/5 },
|
{ number: 5, name: 5/5 },
|
||||||
]
|
]
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
outputs:
|
outputs:
|
||||||
|
@ -112,6 +112,7 @@ jobs:
|
||||||
working-directory: plugins/woocommerce
|
working-directory: plugins/woocommerce
|
||||||
env:
|
env:
|
||||||
WP_ENV_PHP_VERSION: 7.4
|
WP_ENV_PHP_VERSION: 7.4
|
||||||
|
ENABLE_HPOS: 1
|
||||||
run: pnpm env:test
|
run: pnpm env:test
|
||||||
|
|
||||||
- name: Download and install Chromium browser.
|
- name: Download and install Chromium browser.
|
||||||
|
@ -138,50 +139,49 @@ jobs:
|
||||||
path: ${{ env.ALLURE_RESULTS_DIR }}
|
path: ${{ env.ALLURE_RESULTS_DIR }}
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
compression-level: 9
|
compression-level: 9
|
||||||
|
|
||||||
|
|
||||||
merge-reports:
|
merge-reports:
|
||||||
name: Merge e2e test reports
|
name: Merge e2e test reports
|
||||||
if: always()
|
if: always()
|
||||||
needs: e2e-tests
|
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
|
runs-on: ubuntu-latest
|
||||||
uses: actions/download-artifact@v4
|
env:
|
||||||
with:
|
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results
|
||||||
path: ${{ env.ALLURE_RESULTS_DIR }}
|
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report
|
||||||
pattern: all-blob-reports-*
|
steps:
|
||||||
run-id: e2e-tests-run
|
- uses: actions/checkout@v3
|
||||||
merge-multiple: true
|
- name: Setup WooCommerce Monorepo
|
||||||
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||||
|
with:
|
||||||
|
install: '@woocommerce/plugin-woocommerce...'
|
||||||
|
build: '@woocommerce/plugin-woocommerce'
|
||||||
|
|
||||||
- name: Generate Test report.
|
- name: Download blob reports from GitHub Actions Artifacts
|
||||||
id: generate_e2e_report
|
uses: actions/download-artifact@v4
|
||||||
working-directory: plugins/woocommerce
|
with:
|
||||||
run: pnpm exec allure generate --clean ${{ env.ALLURE_RESULTS_DIR }} --output ${{ env.ALLURE_REPORT_DIR }}
|
path: ${{ env.ALLURE_RESULTS_DIR }}
|
||||||
|
pattern: all-blob-reports-*
|
||||||
|
run-id: e2e-tests-run
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Archive Playwright E2E test report
|
- name: Generate Test report.
|
||||||
if: |
|
id: generate_e2e_report
|
||||||
always() &&
|
working-directory: plugins/woocommerce
|
||||||
steps.generate_e2e_report.conclusion == 'success'
|
run: pnpm exec allure generate --clean ${{ env.ALLURE_RESULTS_DIR }} --output ${{ env.ALLURE_REPORT_DIR }}
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
- name: Archive Playwright E2E test report
|
||||||
name: ${{ env.E2E_ARTIFACT }}
|
if: |
|
||||||
path: |
|
always() &&
|
||||||
${{ env.ALLURE_RESULTS_DIR }}
|
steps.generate_e2e_report.conclusion == 'success'
|
||||||
${{ env.ALLURE_REPORT_DIR }}
|
uses: actions/upload-artifact@v4
|
||||||
if-no-files-found: ignore
|
with:
|
||||||
retention-days: 5
|
name: ${{ env.E2E_ARTIFACT }}
|
||||||
|
path: |
|
||||||
|
${{ env.ALLURE_RESULTS_DIR }}
|
||||||
|
${{ env.ALLURE_REPORT_DIR }}
|
||||||
|
if-no-files-found: ignore
|
||||||
|
retention-days: 5
|
||||||
|
|
||||||
k6-tests:
|
k6-tests:
|
||||||
name: k6 tests on nightly build
|
name: k6 tests on nightly build
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
Remove double reporting from daily runs
|
Loading…
Reference in New Issue