2021-08-11 02:38:41 +00:00
|
|
|
name: Smoke test release
|
|
|
|
on:
|
2023-02-27 04:11:46 +00:00
|
|
|
release:
|
2023-03-08 09:23:56 +00:00
|
|
|
types: [released, prereleased, published]
|
2022-04-08 00:19:25 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2023-02-27 04:11:46 +00:00
|
|
|
tag:
|
2023-10-14 08:20:33 +00:00
|
|
|
description: 'WooCommerce release version'
|
2022-04-08 00:19:25 +00:00
|
|
|
required: true
|
2023-02-27 04:11:46 +00:00
|
|
|
concurrency:
|
2023-03-08 09:23:56 +00:00
|
|
|
group: ${{ github.workflow }}-${{ github.event.release.tag_name || inputs.tag }}
|
2023-02-27 04:11:46 +00:00
|
|
|
cancel-in-progress: true
|
2023-01-02 17:28:11 +00:00
|
|
|
permissions: {}
|
2023-02-27 04:11:46 +00:00
|
|
|
env:
|
2023-03-18 00:37:39 +00:00
|
|
|
E2E_WP_LATEST_ARTIFACT: E2E test on release smoke test site with WP Latest (run ${{ github.run_number }})
|
|
|
|
E2E_UPDATE_WC_ARTIFACT: WooCommerce version update test on release smoke test site (run ${{ github.run_number }})
|
2023-05-11 21:29:12 +00:00
|
|
|
SLACK_BLOCKS_ARTIFACT: slack-blocks
|
2021-08-11 02:38:41 +00:00
|
|
|
jobs:
|
2023-10-14 08:20:33 +00:00
|
|
|
validate-version:
|
|
|
|
name: Validate release version
|
2023-02-27 04:11:46 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2022-04-27 01:28:56 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2023-02-27 04:11:46 +00:00
|
|
|
outputs:
|
2023-10-14 08:20:33 +00:00
|
|
|
version: ${{ steps.validate-version.outputs.version }}
|
|
|
|
created: ${{ steps.validate-version.outputs.created }}
|
|
|
|
asset-id: ${{ steps.validate-version.outputs.asset-id }}
|
2023-02-27 04:11:46 +00:00
|
|
|
steps:
|
2023-10-14 08:20:33 +00:00
|
|
|
- uses: actions/checkout@v3
|
2023-02-27 04:11:46 +00:00
|
|
|
|
2023-10-14 08:20:33 +00:00
|
|
|
- name: Validate release version
|
|
|
|
id: validate-version
|
|
|
|
uses: actions/github-script@v6
|
2023-02-27 04:11:46 +00:00
|
|
|
env:
|
2023-10-14 08:20:33 +00:00
|
|
|
RELEASE_VERSION: ${{ inputs.tag }}
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.E2E_GH_TOKEN }}
|
|
|
|
script: |
|
|
|
|
const script = require('./.github/workflows/scripts/validate-release-version.js');
|
|
|
|
await script({ github, context, core });
|
2023-02-27 04:11:46 +00:00
|
|
|
|
2023-09-03 02:56:37 +00:00
|
|
|
e2e-update-wc:
|
|
|
|
name: Test WooCommerce update
|
|
|
|
runs-on: ubuntu-20.04
|
2023-10-14 08:20:33 +00:00
|
|
|
needs: [validate-version]
|
2023-09-03 02:56:37 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
env:
|
|
|
|
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report
|
|
|
|
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
with:
|
|
|
|
install-filters: woocommerce
|
|
|
|
build: false
|
|
|
|
|
|
|
|
- name: Run E2E tests
|
|
|
|
id: run-e2e-composite-action
|
|
|
|
timeout-minutes: 60
|
|
|
|
uses: ./.github/actions/tests/run-e2e-tests
|
|
|
|
with:
|
|
|
|
report-name: ${{ env.E2E_UPDATE_WC_ARTIFACT }}
|
|
|
|
tests: update-woocommerce.spec.js
|
|
|
|
env:
|
|
|
|
ADMIN_PASSWORD: ${{ secrets.RELEASE_TEST_ADMIN_PASSWORD }}
|
|
|
|
ADMIN_USER: ${{ secrets.RELEASE_TEST_ADMIN_USER }}
|
|
|
|
BASE_URL: ${{ secrets.RELEASE_TEST_URL }}
|
|
|
|
CUSTOMER_PASSWORD: ${{ secrets.RELEASE_TEST_CUSTOMER_PASSWORD }}
|
|
|
|
CUSTOMER_USER: ${{ secrets.RELEASE_TEST_CUSTOMER_USER }}
|
|
|
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
|
|
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
2023-10-14 08:20:33 +00:00
|
|
|
UPDATE_WC: ${{ needs.validate-version.outputs.version }}
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
- name: Upload Allure artifacts to bucket
|
|
|
|
if: success() || ( failure() && steps.run-e2e-composite-action.conclusion == 'failure' )
|
|
|
|
uses: ./.github/actions/tests/upload-allure-files-to-bucket
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-region: ${{ secrets.REPORTS_AWS_REGION }}
|
|
|
|
aws-secret-access-key: ${{ secrets.REPORTS_AWS_SECRET_ACCESS_KEY }}
|
|
|
|
artifact-name: ${{ env.E2E_WP_LATEST_ARTIFACT }}
|
|
|
|
s3-bucket: ${{ secrets.REPORTS_BUCKET }}
|
|
|
|
|
|
|
|
- name: Publish E2E Allure report
|
|
|
|
if: success() || ( failure() && steps.run-e2e-composite-action.conclusion == 'failure' )
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
ENV_DESCRIPTION: wp-latest
|
|
|
|
run: |
|
|
|
|
gh workflow run publish-test-reports-release.yml \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f created_at="${{ needs.validate-version.outputs.created }}" \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f run_id=${{ github.run_id }} \
|
|
|
|
-f run_number=${{ github.run_number }} \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f release_tag=${{ needs.validate-version.outputs.version }} \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f artifact="${{ env.E2E_WP_LATEST_ARTIFACT }}" \
|
|
|
|
-f env_description="${{ env.ENV_DESCRIPTION }}" \
|
|
|
|
-f test_type="e2e" \
|
|
|
|
--repo woocommerce/woocommerce-test-reports
|
|
|
|
|
|
|
|
- name: Create Slack block
|
|
|
|
if: |
|
|
|
|
success() || (
|
|
|
|
failure() && steps.run-e2e-composite-action.outputs.result == 'failure'
|
|
|
|
)
|
|
|
|
uses: ./.github/actions/tests/slack-summary-on-release/slack-blocks
|
|
|
|
with:
|
|
|
|
test-name: WC Update test
|
|
|
|
e2e-result: ${{ steps.run-e2e-composite-action.outputs.result }}
|
|
|
|
env-slug: wp-latest
|
2023-10-14 08:20:33 +00:00
|
|
|
release-version: ${{ needs.validate-version.outputs.version }}
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
api-wp-latest:
|
|
|
|
name: API on WP Latest
|
|
|
|
runs-on: ubuntu-20.04
|
2023-10-14 08:20:33 +00:00
|
|
|
needs: [validate-version, e2e-update-wc]
|
2023-09-03 02:56:37 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
outputs:
|
|
|
|
result: ${{ steps.run-api-composite-action.outputs.result }}
|
|
|
|
env:
|
|
|
|
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-report
|
|
|
|
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/api-test-report/allure-results
|
|
|
|
API_WP_LATEST_ARTIFACT: API test on release smoke test site with WP Latest (run ${{ github.run_number }})
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
with:
|
|
|
|
install-filters: woocommerce
|
|
|
|
build: false
|
|
|
|
|
2023-10-11 06:46:46 +00:00
|
|
|
- name: Download and install Chromium browser.
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
run: pnpm exec playwright install chromium
|
|
|
|
|
2023-09-03 02:56:37 +00:00
|
|
|
- name: Run API tests
|
|
|
|
id: run-api-composite-action
|
|
|
|
uses: ./.github/actions/tests/run-api-tests
|
|
|
|
with:
|
|
|
|
report-name: ${{ env.API_WP_LATEST_ARTIFACT }}
|
|
|
|
tests: hello
|
2023-10-11 06:46:46 +00:00
|
|
|
playwright-config: ci-release.playwright.config.js
|
2023-09-03 02:56:37 +00:00
|
|
|
env:
|
|
|
|
API_BASE_URL: ${{ secrets.RELEASE_TEST_URL }}
|
|
|
|
USER_KEY: ${{ secrets.RELEASE_TEST_ADMIN_USER }}
|
|
|
|
USER_SECRET: ${{ secrets.RELEASE_TEST_ADMIN_PASSWORD }}
|
2023-10-14 08:20:33 +00:00
|
|
|
UPDATE_WC: ${{ needs.validate-version.outputs.version }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
- name: Upload Allure artifacts to bucket
|
|
|
|
if: success() || ( failure() && steps.run-api-composite-action.conclusion == 'failure' )
|
|
|
|
uses: ./.github/actions/tests/upload-allure-files-to-bucket
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-region: ${{ secrets.REPORTS_AWS_REGION }}
|
|
|
|
aws-secret-access-key: ${{ secrets.REPORTS_AWS_SECRET_ACCESS_KEY }}
|
|
|
|
artifact-name: ${{ env.API_WP_LATEST_ARTIFACT }}
|
|
|
|
s3-bucket: ${{ secrets.REPORTS_BUCKET }}
|
|
|
|
|
|
|
|
- name: Publish API Allure report
|
|
|
|
if: success() || ( failure() && steps.run-api-composite-action.conclusion == 'failure' )
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
ENV_DESCRIPTION: wp-latest
|
|
|
|
run: |
|
|
|
|
gh workflow run publish-test-reports-release.yml \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f created_at="${{ needs.validate-version.outputs.created }}" \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f run_id=${{ github.run_id }} \
|
|
|
|
-f run_number=${{ github.run_number }} \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f release_tag=${{ needs.validate-version.outputs.version }} \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f artifact="${{ env.API_WP_LATEST_ARTIFACT }}" \
|
|
|
|
-f env_description="${{ env.ENV_DESCRIPTION }}" \
|
|
|
|
-f test_type="api" \
|
|
|
|
--repo woocommerce/woocommerce-test-reports
|
|
|
|
|
|
|
|
- name: Create Slack block
|
|
|
|
if: |
|
|
|
|
success() || (
|
|
|
|
failure() && steps.run-api-composite-action.outputs.result == 'failure'
|
|
|
|
)
|
|
|
|
uses: ./.github/actions/tests/slack-summary-on-release/slack-blocks
|
|
|
|
with:
|
|
|
|
test-name: WP Latest
|
|
|
|
api-result: ${{ steps.run-api-composite-action.outputs.result }}
|
|
|
|
env-slug: wp-latest
|
2023-10-14 08:20:33 +00:00
|
|
|
release-version: ${{ needs.validate-version.outputs.version }}
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
e2e-wp-latest:
|
|
|
|
name: E2E on WP Latest
|
|
|
|
runs-on: ubuntu-20.04
|
2023-10-14 08:20:33 +00:00
|
|
|
needs: [validate-version, api-wp-latest]
|
2023-09-03 02:56:37 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
env:
|
|
|
|
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report
|
|
|
|
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
with:
|
|
|
|
install-filters: woocommerce
|
|
|
|
build: false
|
|
|
|
|
|
|
|
- name: Run E2E tests
|
|
|
|
id: run-e2e-composite-action
|
|
|
|
timeout-minutes: 60
|
|
|
|
uses: ./.github/actions/tests/run-e2e-tests
|
|
|
|
with:
|
|
|
|
report-name: e2e-wp-latest--partial--run-${{ github.run_number }}
|
|
|
|
playwright-config: ignore-plugin-tests.playwright.config.js
|
|
|
|
env:
|
|
|
|
ADMIN_PASSWORD: ${{ secrets.RELEASE_TEST_ADMIN_PASSWORD }}
|
|
|
|
ADMIN_USER: ${{ secrets.RELEASE_TEST_ADMIN_USER }}
|
|
|
|
ADMIN_USER_EMAIL: ${{ secrets.RELEASE_TEST_ADMIN_USER_EMAIL }}
|
|
|
|
BASE_URL: ${{ secrets.RELEASE_TEST_URL }}
|
|
|
|
CUSTOMER_PASSWORD: ${{ secrets.RELEASE_TEST_CUSTOMER_PASSWORD }}
|
|
|
|
CUSTOMER_USER: ${{ secrets.RELEASE_TEST_CUSTOMER_USER }}
|
|
|
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
|
|
|
E2E_MAX_FAILURES: 25
|
|
|
|
RESET_SITE: true
|
|
|
|
|
|
|
|
- name: Download 'e2e-update-wc' artifact
|
|
|
|
if: success() || failure()
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ env.E2E_UPDATE_WC_ARTIFACT }}
|
|
|
|
path: plugins/woocommerce/tmp
|
|
|
|
|
|
|
|
- name: Add allure-results from 'e2e-update-wc'
|
|
|
|
if: success() || failure()
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
run: cp -r tmp/allure-results tests/e2e-pw/test-results
|
|
|
|
|
|
|
|
- name: Generate E2E Test report.
|
|
|
|
if: success() || failure()
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
run: pnpm exec allure generate --clean ${{ env.ALLURE_RESULTS_DIR }} --output ${{ env.ALLURE_REPORT_DIR }}
|
|
|
|
|
|
|
|
- name: Archive E2E test report
|
|
|
|
if: success() || failure()
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ env.E2E_WP_LATEST_ARTIFACT }}
|
|
|
|
path: |
|
|
|
|
${{ env.ALLURE_RESULTS_DIR }}
|
|
|
|
${{ env.ALLURE_REPORT_DIR }}
|
|
|
|
if-no-files-found: ignore
|
|
|
|
retention-days: 5
|
|
|
|
|
|
|
|
- name: Upload Allure artifacts to bucket
|
|
|
|
if: success() || ( failure() && steps.run-e2e-composite-action.conclusion == 'failure' )
|
|
|
|
uses: ./.github/actions/tests/upload-allure-files-to-bucket
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-region: ${{ secrets.REPORTS_AWS_REGION }}
|
|
|
|
aws-secret-access-key: ${{ secrets.REPORTS_AWS_SECRET_ACCESS_KEY }}
|
|
|
|
artifact-name: ${{ env.E2E_WP_LATEST_ARTIFACT }}
|
|
|
|
s3-bucket: ${{ secrets.REPORTS_BUCKET }}
|
|
|
|
|
|
|
|
- name: Publish E2E Allure report
|
|
|
|
if: success() || failure()
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
ENV_DESCRIPTION: wp-latest
|
|
|
|
run: |
|
|
|
|
gh workflow run publish-test-reports-release.yml \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f created_at="${{ needs.validate-version.outputs.created }}" \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f run_id=${{ github.run_id }} \
|
|
|
|
-f run_number=${{ github.run_number }} \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f release_tag=${{ needs.validate-version.outputs.version }} \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f artifact="${{ env.E2E_WP_LATEST_ARTIFACT }}" \
|
|
|
|
-f env_description="${{ env.ENV_DESCRIPTION }}" \
|
|
|
|
-f test_type="e2e" \
|
|
|
|
--repo woocommerce/woocommerce-test-reports
|
|
|
|
|
|
|
|
- name: Create Slack block
|
|
|
|
if: |
|
|
|
|
success() || (
|
|
|
|
failure() && steps.run-e2e-composite-action.outputs.result == 'failure'
|
|
|
|
)
|
|
|
|
uses: ./.github/actions/tests/slack-summary-on-release/slack-blocks
|
|
|
|
with:
|
|
|
|
test-name: WP Latest
|
|
|
|
api-result: ${{ needs.api-wp-latest.outputs.result }}
|
|
|
|
e2e-result: ${{ steps.run-e2e-composite-action.outputs.result }}
|
|
|
|
env-slug: wp-latest
|
2023-10-14 08:20:33 +00:00
|
|
|
release-version: ${{ needs.validate-version.outputs.version }}
|
2023-09-03 02:29:42 +00:00
|
|
|
|
|
|
|
test-wp-latest-1:
|
|
|
|
name: Test against WP Latest-1
|
2023-02-27 04:11:46 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2023-10-14 08:20:33 +00:00
|
|
|
needs: [validate-version]
|
2023-02-27 04:11:46 +00:00
|
|
|
env:
|
|
|
|
API_ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/api/allure-report
|
|
|
|
API_ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/api/allure-results
|
2023-09-03 02:29:42 +00:00
|
|
|
API_WP_LATEST_X_ARTIFACT: API test on wp-env with WordPress L-1 (run ${{ github.run_number }})
|
2023-02-27 04:11:46 +00:00
|
|
|
E2E_ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/e2e/allure-report
|
|
|
|
E2E_ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/e2e/allure-results
|
2023-09-03 02:29:42 +00:00
|
|
|
E2E_WP_LATEST_X_ARTIFACT: E2E test on wp-env with WordPress L-1 (run ${{ github.run_number }})
|
2023-02-27 04:11:46 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
steps:
|
|
|
|
- name: Checkout WooCommerce repo
|
|
|
|
uses: actions/checkout@v3
|
2022-05-12 13:34:55 +00:00
|
|
|
|
2023-09-03 02:29:42 +00:00
|
|
|
- name: Get WP Latest-1 version number
|
|
|
|
id: get-wp-latest-1
|
|
|
|
uses: actions/github-script@v6
|
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
const { getVersionWPLatestMinusOne } = require( './plugins/woocommerce/tests/e2e-pw/utils/wordpress' );
|
|
|
|
await getVersionWPLatestMinusOne( { core, github } );
|
2023-10-11 06:46:46 +00:00
|
|
|
|
2022-09-13 01:55:03 +00:00
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
2023-05-11 21:29:12 +00:00
|
|
|
with:
|
|
|
|
build-filters: woocommerce
|
2023-02-27 04:11:46 +00:00
|
|
|
|
|
|
|
- name: Launch WP Env
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
run: pnpm run env:test
|
2023-09-03 10:19:25 +00:00
|
|
|
env:
|
2023-10-11 06:46:46 +00:00
|
|
|
WP_ENV_CORE: WordPress/WordPress#${{ steps.get-wp-latest-1.outputs.version }}
|
2023-02-27 04:11:46 +00:00
|
|
|
|
|
|
|
- name: Download release zip
|
2023-10-14 08:20:33 +00:00
|
|
|
id: download-zip
|
|
|
|
uses: actions/github-script@v6
|
2023-02-27 04:11:46 +00:00
|
|
|
env:
|
2023-10-14 08:20:33 +00:00
|
|
|
ASSET_ID: ${{ needs.validate-version.outputs.asset-id }}
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.E2E_GH_TOKEN }}
|
|
|
|
script: |
|
|
|
|
const script = require('./.github/workflows/scripts/download-release-zip.js');
|
|
|
|
await script({ github, context, core });
|
2023-02-27 04:11:46 +00:00
|
|
|
|
|
|
|
- name: Replace `plugins/woocommerce` with unzipped woocommerce release build
|
2023-10-14 08:20:33 +00:00
|
|
|
run: unzip -d plugins -o ${{ env.ZIP_PATH }}
|
|
|
|
env:
|
|
|
|
ZIP_PATH: ${{ steps.download-zip.outputs.zip-path }}
|
2023-02-27 04:11:46 +00:00
|
|
|
|
2023-03-16 07:13:41 +00:00
|
|
|
- name: Run API tests
|
|
|
|
id: run-api-composite-action
|
|
|
|
uses: ./.github/actions/tests/run-api-tests
|
|
|
|
with:
|
|
|
|
report-name: ${{ env.API_WP_LATEST_X_ARTIFACT }}
|
2023-05-11 21:29:12 +00:00
|
|
|
tests: hello.test.js
|
2023-02-27 04:11:46 +00:00
|
|
|
env:
|
|
|
|
ALLURE_RESULTS_DIR: ${{ env.API_ALLURE_RESULTS_DIR }}
|
2023-03-16 08:09:53 +00:00
|
|
|
ALLURE_REPORT_DIR: ${{ env.API_ALLURE_REPORT_DIR }}
|
2023-02-27 04:11:46 +00:00
|
|
|
|
2023-09-03 02:56:37 +00:00
|
|
|
- name: Upload Allure artifacts to bucket
|
|
|
|
if: success() || ( failure() && steps.run-api-composite-action.conclusion == 'failure' )
|
|
|
|
uses: ./.github/actions/tests/upload-allure-files-to-bucket
|
|
|
|
env:
|
|
|
|
ALLURE_RESULTS_DIR: ${{ env.API_ALLURE_RESULTS_DIR }}
|
|
|
|
ALLURE_REPORT_DIR: ${{ env.API_ALLURE_REPORT_DIR }}
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-region: ${{ secrets.REPORTS_AWS_REGION }}
|
|
|
|
aws-secret-access-key: ${{ secrets.REPORTS_AWS_SECRET_ACCESS_KEY }}
|
|
|
|
artifact-name: ${{ env.API_WP_LATEST_X_ARTIFACT }}
|
|
|
|
s3-bucket: ${{ secrets.REPORTS_BUCKET }}
|
|
|
|
|
|
|
|
- name: Publish API Allure report
|
|
|
|
if: success() || ( failure() && steps.run-api-composite-action.conclusion == 'failure' )
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
ENV_DESCRIPTION: wp-latest-1
|
|
|
|
run: |
|
|
|
|
gh workflow run publish-test-reports-release.yml \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f created_at="${{ needs.validate-version.outputs.created }}" \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f run_id=${{ github.run_id }} \
|
|
|
|
-f run_number=${{ github.run_number }} \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f release_tag=${{ needs.validate-version.outputs.version }} \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f artifact="${{ env.API_WP_LATEST_X_ARTIFACT }}" \
|
2023-09-03 03:55:16 +00:00
|
|
|
-f env_description="${{ env.ENV_DESCRIPTION }}" \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f test_type="api" \
|
|
|
|
--repo woocommerce/woocommerce-test-reports
|
2023-02-27 04:11:46 +00:00
|
|
|
|
2023-03-16 07:13:41 +00:00
|
|
|
- name: Run E2E tests
|
|
|
|
id: run-e2e-composite-action
|
2023-02-27 04:11:46 +00:00
|
|
|
timeout-minutes: 60
|
2023-03-16 07:13:41 +00:00
|
|
|
uses: ./.github/actions/tests/run-e2e-tests
|
2023-02-27 04:11:46 +00:00
|
|
|
env:
|
|
|
|
E2E_MAX_FAILURES: 15
|
|
|
|
ALLURE_RESULTS_DIR: ${{ env.E2E_ALLURE_RESULTS_DIR }}
|
2023-03-16 08:09:53 +00:00
|
|
|
ALLURE_REPORT_DIR: ${{ env.E2E_ALLURE_REPORT_DIR }}
|
2023-02-27 04:11:46 +00:00
|
|
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
2023-03-16 07:13:41 +00:00
|
|
|
with:
|
|
|
|
report-name: ${{ env.E2E_WP_LATEST_X_ARTIFACT }}
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
- name: Upload Allure artifacts to bucket
|
|
|
|
if: success() || ( failure() && steps.run-e2e-composite-action.conclusion == 'failure' )
|
|
|
|
uses: ./.github/actions/tests/upload-allure-files-to-bucket
|
|
|
|
env:
|
|
|
|
ALLURE_RESULTS_DIR: ${{ env.E2E_ALLURE_RESULTS_DIR }}
|
|
|
|
ALLURE_REPORT_DIR: ${{ env.E2E_ALLURE_REPORT_DIR }}
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-region: ${{ secrets.REPORTS_AWS_REGION }}
|
|
|
|
aws-secret-access-key: ${{ secrets.REPORTS_AWS_SECRET_ACCESS_KEY }}
|
|
|
|
artifact-name: ${{ env.E2E_WP_LATEST_X_ARTIFACT }}
|
|
|
|
s3-bucket: ${{ secrets.REPORTS_BUCKET }}
|
|
|
|
|
|
|
|
- name: Publish E2E Allure report
|
|
|
|
if: success() || ( failure() && steps.run-e2e-composite-action.conclusion == 'failure' )
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
ENV_DESCRIPTION: wp-latest-1
|
|
|
|
run: |
|
|
|
|
gh workflow run publish-test-reports-release.yml \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f created_at="${{ needs.validate-version.outputs.created }}" \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f run_id=${{ github.run_id }} \
|
|
|
|
-f run_number=${{ github.run_number }} \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f release_tag=${{ needs.validate-version.outputs.version }} \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f artifact="${{ env.E2E_WP_LATEST_X_ARTIFACT }}" \
|
|
|
|
-f env_description="${{ env.ENV_DESCRIPTION }}" \
|
|
|
|
-f test_type="e2e" \
|
|
|
|
--repo woocommerce/woocommerce-test-reports
|
2023-02-27 04:11:46 +00:00
|
|
|
|
2023-05-11 21:29:12 +00:00
|
|
|
- name: Create Slack block
|
|
|
|
if: |
|
|
|
|
success() || (
|
|
|
|
failure() && (
|
|
|
|
steps.run-api-composite-action.outputs.result == 'failure' ||
|
|
|
|
steps.run-e2e-composite-action.outputs.result == 'failure'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
uses: ./.github/actions/tests/slack-summary-on-release/slack-blocks
|
|
|
|
with:
|
2023-09-03 02:29:42 +00:00
|
|
|
test-name: WP Latest-1 (${{ steps.get-wp-latest-1.outputs.version }})
|
2023-05-11 21:29:12 +00:00
|
|
|
api-result: ${{ steps.run-api-composite-action.outputs.result }}
|
|
|
|
e2e-result: ${{ steps.run-e2e-composite-action.outputs.result }}
|
2023-09-03 02:29:42 +00:00
|
|
|
env-slug: wp-latest-1
|
2023-10-14 08:20:33 +00:00
|
|
|
release-version: ${{ needs.validate-version.outputs.version }}
|
2023-05-11 21:29:12 +00:00
|
|
|
|
2023-09-03 02:56:37 +00:00
|
|
|
test-php-versions:
|
|
|
|
name: Test against PHP ${{ matrix.php_version }}
|
|
|
|
runs-on: ubuntu-20.04
|
2023-10-14 08:20:33 +00:00
|
|
|
needs: [validate-version]
|
2023-09-03 02:56:37 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
php_version: ['7.4', '8.1']
|
|
|
|
env:
|
|
|
|
API_ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-report
|
|
|
|
API_ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-results
|
|
|
|
API_ARTIFACT: API test on wp-env with PHP ${{ matrix.php_version }} (run ${{ github.run_number }})
|
|
|
|
E2E_ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-report
|
|
|
|
E2E_ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/test-results/allure-results
|
|
|
|
E2E_ARTIFACT: E2E test on wp-env with PHP ${{ matrix.php_version }} (run ${{ github.run_number }})
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
with:
|
|
|
|
build-filters: woocommerce
|
|
|
|
|
|
|
|
- name: Launch WP Env
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
env:
|
|
|
|
WP_ENV_PHP_VERSION: ${{ matrix.php_version }}
|
|
|
|
run: pnpm run env:test
|
|
|
|
|
|
|
|
- name: Verify PHP version
|
|
|
|
working-directory: .github/workflows/scripts
|
|
|
|
env:
|
|
|
|
EXPECTED_PHP_VERSION: ${{ matrix.php_version }}
|
|
|
|
run: bash verify-php-version.sh
|
|
|
|
|
|
|
|
- name: Download release zip
|
2023-10-14 08:20:33 +00:00
|
|
|
id: download-zip
|
|
|
|
uses: actions/github-script@v6
|
2023-09-03 02:56:37 +00:00
|
|
|
env:
|
2023-10-14 08:20:33 +00:00
|
|
|
ASSET_ID: ${{ needs.validate-version.outputs.asset-id }}
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.E2E_GH_TOKEN }}
|
|
|
|
script: |
|
|
|
|
const script = require('./.github/workflows/scripts/download-release-zip.js');
|
|
|
|
await script({ github, context, core });
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
- name: Replace `plugins/woocommerce` with unzipped woocommerce release build
|
2023-10-14 08:20:33 +00:00
|
|
|
run: unzip -d plugins -o ${{ env.ZIP_PATH }}
|
|
|
|
env:
|
|
|
|
ZIP_PATH: ${{ steps.download-zip.outputs.zip-path }}
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
- name: Run API tests
|
|
|
|
id: run-api-composite-action
|
|
|
|
uses: ./.github/actions/tests/run-api-tests
|
|
|
|
with:
|
|
|
|
report-name: ${{ env.API_ARTIFACT }}
|
|
|
|
tests: hello.test.js
|
|
|
|
env:
|
|
|
|
ALLURE_RESULTS_DIR: ${{ env.API_ALLURE_RESULTS_DIR }}
|
|
|
|
ALLURE_REPORT_DIR: ${{ env.API_ALLURE_REPORT_DIR }}
|
|
|
|
|
|
|
|
- name: Upload Allure artifacts to bucket
|
|
|
|
if: success() || ( failure() && steps.run-api-composite-action.conclusion == 'failure' )
|
|
|
|
uses: ./.github/actions/tests/upload-allure-files-to-bucket
|
|
|
|
env:
|
|
|
|
ALLURE_RESULTS_DIR: ${{ env.API_ALLURE_RESULTS_DIR }}
|
|
|
|
ALLURE_REPORT_DIR: ${{ env.API_ALLURE_REPORT_DIR }}
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-region: ${{ secrets.REPORTS_AWS_REGION }}
|
|
|
|
aws-secret-access-key: ${{ secrets.REPORTS_AWS_SECRET_ACCESS_KEY }}
|
|
|
|
artifact-name: ${{ env.API_ARTIFACT }}
|
|
|
|
s3-bucket: ${{ secrets.REPORTS_BUCKET }}
|
|
|
|
|
|
|
|
- name: Publish API Allure report
|
|
|
|
if: success() || ( failure() && steps.run-api-composite-action.conclusion == 'failure' )
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
ENV_DESCRIPTION: php-${{ matrix.php_version }}
|
|
|
|
run: |
|
|
|
|
gh workflow run publish-test-reports-release.yml \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f created_at="${{ needs.validate-version.outputs.created }}" \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f run_id=${{ github.run_id }} \
|
|
|
|
-f run_number=${{ github.run_number }} \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f release_tag=${{ needs.validate-version.outputs.version }} \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f artifact="${{ env.API_ARTIFACT }}" \
|
|
|
|
-f env_description="${{ env.ENV_DESCRIPTION }}" \
|
|
|
|
-f test_type="api" \
|
|
|
|
--repo woocommerce/woocommerce-test-reports
|
|
|
|
|
|
|
|
- name: Run E2E tests
|
|
|
|
id: run-e2e-composite-action
|
|
|
|
timeout-minutes: 60
|
|
|
|
uses: ./.github/actions/tests/run-e2e-tests
|
|
|
|
env:
|
|
|
|
ALLURE_RESULTS_DIR: ${{ env.E2E_ALLURE_RESULTS_DIR }}
|
|
|
|
ALLURE_REPORT_DIR: ${{ env.E2E_ALLURE_REPORT_DIR }}
|
|
|
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
|
|
|
E2E_MAX_FAILURES: 15
|
|
|
|
with:
|
|
|
|
report-name: ${{ env.E2E_ARTIFACT }}
|
|
|
|
|
|
|
|
- name: Upload Allure artifacts to bucket
|
|
|
|
if: success() || ( failure() && steps.run-e2e-composite-action.conclusion == 'failure' )
|
|
|
|
uses: ./.github/actions/tests/upload-allure-files-to-bucket
|
|
|
|
env:
|
|
|
|
ALLURE_RESULTS_DIR: ${{ env.E2E_ALLURE_RESULTS_DIR }}
|
|
|
|
ALLURE_REPORT_DIR: ${{ env.E2E_ALLURE_REPORT_DIR }}
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-region: ${{ secrets.REPORTS_AWS_REGION }}
|
|
|
|
aws-secret-access-key: ${{ secrets.REPORTS_AWS_SECRET_ACCESS_KEY }}
|
|
|
|
artifact-name: ${{ env.E2E_ARTIFACT }}
|
|
|
|
s3-bucket: ${{ secrets.REPORTS_BUCKET }}
|
|
|
|
|
|
|
|
- name: Publish E2E Allure report
|
|
|
|
if: success() || ( failure() && steps.run-e2e-composite-action.conclusion == 'failure' )
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
ENV_DESCRIPTION: php-${{ matrix.php_version }}
|
|
|
|
run: |
|
|
|
|
gh workflow run publish-test-reports-release.yml \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f created_at="${{ needs.validate-version.outputs.created }}" \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f run_id=${{ github.run_id }} \
|
|
|
|
-f run_number=${{ github.run_number }} \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f release_tag=${{ needs.validate-version.outputs.version }} \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f artifact="${{ env.E2E_ARTIFACT }}" \
|
|
|
|
-f env_description="${{ env.ENV_DESCRIPTION }}" \
|
|
|
|
-f test_type="e2e" \
|
|
|
|
--repo woocommerce/woocommerce-test-reports
|
|
|
|
|
|
|
|
- name: Create Slack block
|
|
|
|
if: |
|
|
|
|
success() || (
|
|
|
|
failure() && (
|
|
|
|
steps.run-api-composite-action.outputs.result == 'failure' ||
|
|
|
|
steps.run-e2e-composite-action.outputs.result == 'failure'
|
|
|
|
)
|
|
|
|
)
|
|
|
|
uses: ./.github/actions/tests/slack-summary-on-release/slack-blocks
|
|
|
|
with:
|
|
|
|
test-name: PHP ${{ matrix.php_version }}
|
|
|
|
api-result: ${{ steps.run-api-composite-action.outputs.result }}
|
|
|
|
e2e-result: ${{ steps.run-e2e-composite-action.outputs.result }}
|
|
|
|
env-slug: php-${{ matrix.php_version }}
|
2023-10-14 08:20:33 +00:00
|
|
|
release-version: ${{ needs.validate-version.outputs.version }}
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
test-plugins:
|
|
|
|
name: With ${{ matrix.plugin }}
|
|
|
|
runs-on: ubuntu-20.04
|
2023-10-14 08:20:33 +00:00
|
|
|
needs: [validate-version]
|
2023-09-03 02:56:37 +00:00
|
|
|
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
|
|
|
|
ARTIFACT_NAME: E2E test on wp-env with ${{ matrix.plugin }} installed (run ${{ github.run_number }})
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- plugin: 'WooCommerce Payments'
|
|
|
|
repo: 'automattic/woocommerce-payments'
|
|
|
|
env_description: 'woocommerce-payments'
|
|
|
|
- plugin: 'WooCommerce PayPal Payments'
|
|
|
|
repo: 'woocommerce/woocommerce-paypal-payments'
|
|
|
|
env_description: 'woocommerce-paypal-payments'
|
|
|
|
- plugin: 'WooCommerce Shipping & Tax'
|
|
|
|
repo: 'automattic/woocommerce-services'
|
|
|
|
env_description: 'woocommerce-shipping-&-tax'
|
|
|
|
- plugin: 'WooCommerce Subscriptions'
|
|
|
|
repo: WC_SUBSCRIPTIONS_REPO
|
|
|
|
private: true
|
|
|
|
env_description: 'woocommerce-subscriptions'
|
|
|
|
- plugin: 'Gutenberg'
|
|
|
|
repo: 'WordPress/gutenberg'
|
|
|
|
env_description: 'gutenberg'
|
|
|
|
- plugin: 'Gutenberg - Nightly'
|
|
|
|
repo: 'bph/gutenberg'
|
|
|
|
env_description: 'gutenberg-nightly'
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
with:
|
|
|
|
build-filters: woocommerce
|
|
|
|
|
|
|
|
- name: Launch WP Env
|
|
|
|
working-directory: plugins/woocommerce
|
|
|
|
run: pnpm run env:test
|
|
|
|
|
|
|
|
- name: Download release zip
|
2023-10-14 08:20:33 +00:00
|
|
|
id: download-zip
|
|
|
|
uses: actions/github-script@v6
|
2023-09-03 02:56:37 +00:00
|
|
|
env:
|
2023-10-14 08:20:33 +00:00
|
|
|
ASSET_ID: ${{ needs.validate-version.outputs.asset-id }}
|
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.E2E_GH_TOKEN }}
|
|
|
|
script: |
|
|
|
|
const script = require('./.github/workflows/scripts/download-release-zip.js');
|
|
|
|
await script({ github, context, core });
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
- name: Replace `plugins/woocommerce` with unzipped woocommerce release build
|
2023-10-14 08:20:33 +00:00
|
|
|
run: unzip -d plugins -o ${{ env.ZIP_PATH }}
|
|
|
|
env:
|
|
|
|
ZIP_PATH: ${{ steps.download-zip.outputs.zip-path }}
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
- name: Run 'Upload plugin' test
|
|
|
|
id: run-upload-test
|
|
|
|
timeout-minutes: 60
|
|
|
|
uses: ./.github/actions/tests/run-e2e-tests
|
|
|
|
with:
|
|
|
|
report-name: ${{ env.ARTIFACT_NAME }}
|
|
|
|
tests: upload-plugin.spec.js
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
|
|
|
PLUGIN_NAME: ${{ matrix.plugin }}
|
|
|
|
PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
|
|
|
|
|
|
|
- name: Run the rest of E2E tests
|
|
|
|
id: run-e2e-composite-action
|
|
|
|
timeout-minutes: 60
|
|
|
|
uses: ./.github/actions/tests/run-e2e-tests
|
|
|
|
with:
|
|
|
|
playwright-config: ignore-plugin-tests.playwright.config.js
|
|
|
|
report-name: ${{ env.ARTIFACT_NAME }}
|
|
|
|
env:
|
|
|
|
E2E_MAX_FAILURES: 15
|
|
|
|
|
|
|
|
- name: Upload Allure artifacts to bucket
|
|
|
|
if: |
|
|
|
|
success() ||
|
|
|
|
( failure() &&
|
|
|
|
( steps.run-upload-test.conclusion == 'failure' || steps.run-e2e-composite-action.conclusion == 'failure' ) )
|
|
|
|
uses: ./.github/actions/tests/upload-allure-files-to-bucket
|
|
|
|
with:
|
|
|
|
aws-access-key-id: ${{ secrets.REPORTS_AWS_ACCESS_KEY_ID }}
|
|
|
|
aws-region: ${{ secrets.REPORTS_AWS_REGION }}
|
|
|
|
aws-secret-access-key: ${{ secrets.REPORTS_AWS_SECRET_ACCESS_KEY }}
|
|
|
|
artifact-name: ${{ env.ARTIFACT_NAME }}
|
|
|
|
s3-bucket: ${{ secrets.REPORTS_BUCKET }}
|
|
|
|
|
|
|
|
- name: Publish E2E Allure report
|
|
|
|
if: success() || ( failure() && steps.run-e2e-composite-action.conclusion == 'failure' )
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
run: |
|
|
|
|
gh workflow run publish-test-reports-release.yml \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f created_at="${{ needs.validate-version.outputs.created }}" \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f run_id=${{ github.run_id }} \
|
|
|
|
-f run_number=${{ github.run_number }} \
|
2023-10-14 08:20:33 +00:00
|
|
|
-f release_tag=${{ needs.validate-version.outputs.version }} \
|
2023-09-03 02:56:37 +00:00
|
|
|
-f artifact="${{ env.ARTIFACT_NAME }}" \
|
|
|
|
-f env_description="${{ matrix.env_description }}" \
|
|
|
|
-f test_type="e2e" \
|
|
|
|
--repo woocommerce/woocommerce-test-reports
|
|
|
|
|
|
|
|
- name: Create Slack block
|
|
|
|
if: |
|
|
|
|
success() || (
|
|
|
|
failure() && steps.run-e2e-composite-action.outputs.result == 'failure' )
|
|
|
|
uses: ./.github/actions/tests/slack-summary-on-release/slack-blocks
|
|
|
|
with:
|
|
|
|
test-name: With ${{ matrix.plugin }}
|
|
|
|
e2e-result: ${{ steps.run-e2e-composite-action.outputs.result }}
|
|
|
|
env-slug: ${{ matrix.env_description }}
|
2023-10-14 08:20:33 +00:00
|
|
|
release-version: ${{ needs.validate-version.outputs.version }}
|
2023-09-03 02:56:37 +00:00
|
|
|
|
|
|
|
post-slack-summary:
|
|
|
|
name: Post Slack summary
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
if: |
|
|
|
|
success() || (
|
|
|
|
failure() && contains( needs.*.result, 'failure' )
|
|
|
|
)
|
|
|
|
needs:
|
|
|
|
- e2e-wp-latest
|
2023-10-14 08:20:33 +00:00
|
|
|
- validate-version
|
2023-09-03 02:56:37 +00:00
|
|
|
- test-php-versions
|
|
|
|
- test-plugins
|
|
|
|
- test-wp-latest-1
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Download all slack blocks
|
|
|
|
id: download-slack-blocks
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ env.SLACK_BLOCKS_ARTIFACT }}
|
|
|
|
path: /tmp/slack-payload
|
|
|
|
|
|
|
|
- name: Construct payload from all blocks
|
|
|
|
id: run-payload-action
|
|
|
|
uses: ./.github/actions/tests/slack-summary-on-release/slack-payload
|
|
|
|
with:
|
2023-10-14 08:20:33 +00:00
|
|
|
release-version: ${{ needs.validate-version.outputs.version }}
|
2023-09-03 02:56:37 +00:00
|
|
|
blocks-dir: ${{ steps.download-slack-blocks.outputs.download-path }}
|
|
|
|
|
|
|
|
- name: Send Slack message
|
|
|
|
uses: slackapi/slack-github-action@v1.23.0
|
|
|
|
with:
|
|
|
|
channel-id: ${{ secrets.RELEASE_TEST_SLACK_CHANNEL }}
|
|
|
|
payload: ${{ steps.run-payload-action.outputs.payload }}
|
|
|
|
env:
|
|
|
|
SLACK_BOT_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
|