2021-04-01 20:17:34 +00:00
|
|
|
name: Smoke test daily
|
|
|
|
on:
|
2022-12-06 03:22:49 +00:00
|
|
|
schedule:
|
|
|
|
- cron: '25 3 * * *'
|
2022-05-17 19:29:16 +00:00
|
|
|
workflow_dispatch:
|
2022-05-16 09:59:40 +00:00
|
|
|
|
2022-10-21 16:07:53 +00:00
|
|
|
env:
|
|
|
|
API_ARTIFACT: api-daily--run-${{ github.run_number }}
|
|
|
|
E2E_ARTIFACT: e2e-daily--run-${{ github.run_number }}
|
|
|
|
FORCE_COLOR: 1
|
2023-08-15 08:51:06 +00:00
|
|
|
PLUGIN_SLACK_BLOCKS_ARTIFACT: plugin-blocks
|
2022-10-21 16:07:53 +00:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2023-01-02 17:28:11 +00:00
|
|
|
permissions: {}
|
|
|
|
|
2021-04-01 20:17:34 +00:00
|
|
|
jobs:
|
2023-05-13 01:31:55 +00:00
|
|
|
api-tests:
|
|
|
|
name: API tests on nightly build
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
permissions:
|
|
|
|
contents: read
|
2023-08-15 08:48:22 +00:00
|
|
|
outputs:
|
|
|
|
test-result: ${{ steps.run-api-composite-action.outputs.result }}
|
2023-05-13 01:31:55 +00:00
|
|
|
env:
|
|
|
|
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-results
|
|
|
|
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/api-core-tests/test-results/allure-report
|
|
|
|
BASE_URL: ${{ secrets.SMOKE_TEST_URL }}
|
2023-07-20 21:26:59 +00:00
|
|
|
API_BASE_URL: ${{ secrets.SMOKE_TEST_API_URL }}
|
2023-05-13 01:31:55 +00:00
|
|
|
ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
|
|
|
ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
|
|
|
ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
|
|
|
CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
|
|
|
CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
|
|
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
2023-09-06 23:14:51 +00:00
|
|
|
UPDATE_WC: 'nightly'
|
2023-05-13 01:31:55 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
with:
|
|
|
|
install-filters: woocommerce
|
|
|
|
build: false
|
|
|
|
|
2023-08-15 08:42:33 +00:00
|
|
|
- name: Run API tests
|
|
|
|
id: run-api-composite-action
|
|
|
|
uses: ./.github/actions/tests/run-api-tests
|
|
|
|
with:
|
|
|
|
report-name: ${{ env.API_ARTIFACT }}
|
2023-05-13 01:31:55 +00:00
|
|
|
env:
|
|
|
|
USER_KEY: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
|
|
|
USER_SECRET: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
2023-11-01 22:44:24 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
|
|
|
UPDATE_WC: nightly
|
2023-05-13 01:31:55 +00:00
|
|
|
|
|
|
|
e2e-tests:
|
|
|
|
name: E2E tests on nightly build
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
permissions:
|
|
|
|
contents: read
|
2023-08-15 08:48:22 +00:00
|
|
|
outputs:
|
|
|
|
test-result: ${{ steps.run-e2e-composite-action.outputs.result }}
|
2023-09-01 21:30:18 +00:00
|
|
|
# needs: [api-tests]
|
2023-05-13 01:31:55 +00:00
|
|
|
env:
|
|
|
|
ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
|
|
|
ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
|
|
|
ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
|
|
|
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
|
|
|
|
BASE_URL: ${{ secrets.SMOKE_TEST_URL }}
|
|
|
|
CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
|
|
|
CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
|
|
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
with:
|
|
|
|
install-filters: woocommerce
|
|
|
|
build: false
|
|
|
|
|
2023-08-15 08:44:12 +00:00
|
|
|
- name: Run E2E tests
|
|
|
|
id: run-e2e-composite-action
|
2023-05-13 01:31:55 +00:00
|
|
|
timeout-minutes: 60
|
2023-08-15 08:44:12 +00:00
|
|
|
uses: ./.github/actions/tests/run-e2e-tests
|
|
|
|
with:
|
|
|
|
report-name: ${{ env.E2E_ARTIFACT }}
|
2023-05-13 01:31:55 +00:00
|
|
|
env:
|
2023-08-15 08:44:12 +00:00
|
|
|
ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
|
|
|
ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
|
|
|
ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
|
|
|
|
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
|
|
|
|
BASE_URL: ${{ secrets.SMOKE_TEST_URL }}
|
|
|
|
CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
|
|
|
|
CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
|
|
|
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
2023-05-13 01:31:55 +00:00
|
|
|
E2E_MAX_FAILURES: 25
|
|
|
|
RESET_SITE: true
|
|
|
|
|
|
|
|
k6-tests:
|
|
|
|
name: k6 tests on nightly build
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
needs: [api-tests]
|
|
|
|
if: success() || failure()
|
2023-08-15 08:48:22 +00:00
|
|
|
outputs:
|
|
|
|
test-result: ${{ steps.run-k6-tests.conclusion }}
|
2023-05-13 01:31:55 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
with:
|
|
|
|
install-filters: woocommerce
|
|
|
|
build: false
|
|
|
|
|
|
|
|
- name: Update performance test site with E2E test
|
2023-08-15 08:44:50 +00:00
|
|
|
id: update-perf-site
|
|
|
|
continue-on-error: true
|
|
|
|
uses: ./.github/actions/tests/run-e2e-tests
|
|
|
|
with:
|
|
|
|
report-name: k6-daily-update-site--run-${{ github.run_number }}
|
|
|
|
tests: update-woocommerce.spec.js
|
2023-05-13 01:31:55 +00:00
|
|
|
env:
|
2023-08-17 02:42:13 +00:00
|
|
|
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results
|
|
|
|
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-report
|
2023-05-13 01:31:55 +00:00
|
|
|
BASE_URL: ${{ secrets.SMOKE_TEST_PERF_URL }}/
|
|
|
|
ADMIN_USER: ${{ secrets.SMOKE_TEST_PERF_ADMIN_USER }}
|
|
|
|
ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }}
|
|
|
|
CUSTOMER_USER: ${{ secrets.SMOKE_TEST_PERF_ADMIN_USER }}
|
|
|
|
CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }}
|
|
|
|
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
2023-08-15 08:44:50 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
|
|
|
UPDATE_WC: nightly
|
2023-05-13 01:31:55 +00:00
|
|
|
|
|
|
|
- name: Install k6
|
|
|
|
run: |
|
|
|
|
curl https://github.com/grafana/k6/releases/download/v0.33.0/k6-v0.33.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1
|
|
|
|
|
2023-08-25 10:06:46 +00:00
|
|
|
- name: Run k6 smoke tests
|
2023-08-15 08:48:22 +00:00
|
|
|
id: run-k6-tests
|
2023-05-13 01:31:55 +00:00
|
|
|
env:
|
|
|
|
URL: ${{ secrets.SMOKE_TEST_PERF_URL }}
|
|
|
|
HOST: ${{ secrets.SMOKE_TEST_PERF_HOST }}
|
|
|
|
A_USER: ${{ secrets.SMOKE_TEST_PERF_ADMIN_USER }}
|
|
|
|
A_PW: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }}
|
|
|
|
C_USER: ${{ secrets.SMOKE_TEST_PERF_ADMIN_USER }}
|
|
|
|
C_PW: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }}
|
|
|
|
P_ID: 22733
|
|
|
|
run: |
|
|
|
|
./k6 run plugins/woocommerce/tests/performance/tests/gh-action-daily-ext-requests.js
|
2022-06-29 22:01:37 +00:00
|
|
|
|
2022-04-08 00:19:25 +00:00
|
|
|
test-plugins:
|
2022-12-06 03:22:49 +00:00
|
|
|
name: Smoke tests on trunk with ${{ matrix.plugin }} plugin installed
|
2022-04-27 01:28:56 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2023-01-02 17:28:11 +00:00
|
|
|
permissions:
|
2023-02-27 04:11:46 +00:00
|
|
|
contents: read
|
2023-05-13 01:31:55 +00:00
|
|
|
needs: [api-tests]
|
2022-10-21 16:07:53 +00:00
|
|
|
env:
|
2022-10-24 23:53:46 +00:00
|
|
|
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results
|
|
|
|
ALLURE_REPORT_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-report
|
2022-04-08 00:19:25 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2023-05-13 01:31:55 +00:00
|
|
|
- plugin: 'WooCommerce Payments'
|
|
|
|
repo: 'automattic/woocommerce-payments'
|
2023-08-15 08:51:06 +00:00
|
|
|
slug: woocommerce-payments
|
2023-05-13 01:31:55 +00:00
|
|
|
- plugin: 'WooCommerce PayPal Payments'
|
|
|
|
repo: 'woocommerce/woocommerce-paypal-payments'
|
2023-08-15 08:51:06 +00:00
|
|
|
slug: woocommerce-paypal-payments
|
2023-05-13 01:31:55 +00:00
|
|
|
- plugin: 'WooCommerce Shipping & Tax'
|
|
|
|
repo: 'automattic/woocommerce-services'
|
2023-08-15 08:51:06 +00:00
|
|
|
slug: woocommerce-services
|
2023-11-15 15:08:47 +00:00
|
|
|
- plugin: 'Woo Subscriptions'
|
2023-05-13 01:31:55 +00:00
|
|
|
repo: WC_SUBSCRIPTIONS_REPO
|
|
|
|
private: true
|
2023-08-15 08:51:06 +00:00
|
|
|
slug: woocommerce-subscriptions
|
2023-05-12 04:21:23 +00:00
|
|
|
- plugin: 'Gutenberg'
|
2023-05-11 10:19:19 +00:00
|
|
|
repo: 'WordPress/gutenberg'
|
2023-08-15 08:51:06 +00:00
|
|
|
slug: gutenberg
|
2023-05-12 04:21:23 +00:00
|
|
|
- plugin: 'Gutenberg - Nightly'
|
2023-05-11 10:19:19 +00:00
|
|
|
repo: 'bph/gutenberg'
|
2023-08-15 08:51:06 +00:00
|
|
|
slug: gutenberg-nightly
|
2022-04-08 00:19:25 +00:00
|
|
|
steps:
|
2022-05-17 18:48:24 +00:00
|
|
|
- uses: actions/checkout@v3
|
2021-12-09 21:07:13 +00:00
|
|
|
|
2022-10-21 16:07:53 +00:00
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
2023-05-12 05:05:52 +00:00
|
|
|
with:
|
|
|
|
build-filters: woocommerce
|
2021-12-09 21:07:13 +00:00
|
|
|
|
2023-08-15 08:47:20 +00:00
|
|
|
- name: Setup local test environment
|
|
|
|
uses: ./.github/actions/tests/setup-local-test-environment
|
|
|
|
with:
|
|
|
|
test-type: e2e
|
2022-04-08 00:19:25 +00:00
|
|
|
|
2022-10-21 16:07:53 +00:00
|
|
|
- name: Run 'Upload plugin' test
|
2023-08-15 08:47:20 +00:00
|
|
|
id: run-upload-plugin-test
|
|
|
|
uses: ./.github/actions/tests/run-e2e-tests
|
|
|
|
with:
|
|
|
|
report-name: Smoke tests on trunk with ${{ matrix.plugin }} plugin installed (run ${{ github.run_number }})
|
|
|
|
tests: upload-plugin.spec.js
|
2022-04-08 00:19:25 +00:00
|
|
|
env:
|
|
|
|
PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
|
|
|
|
PLUGIN_NAME: ${{ matrix.plugin }}
|
2023-11-15 15:08:47 +00:00
|
|
|
PLUGIN_SLUG: ${{ matrix.slug }}
|
2022-04-08 00:19:25 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
|
2022-10-21 16:07:53 +00:00
|
|
|
|
|
|
|
- name: Run the rest of E2E tests
|
2023-08-15 08:47:20 +00:00
|
|
|
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: Smoke tests on trunk with ${{ matrix.plugin }} plugin installed (run ${{ github.run_number }})
|
2022-10-21 16:07:53 +00:00
|
|
|
env:
|
|
|
|
E2E_MAX_FAILURES: 15
|
|
|
|
|
2023-08-15 08:51:06 +00:00
|
|
|
- name: Create context block and save as JSON file
|
2023-08-16 10:02:06 +00:00
|
|
|
if: success() || failure()
|
2023-08-15 08:51:06 +00:00
|
|
|
id: create-block-json
|
|
|
|
uses: actions/github-script@v6
|
|
|
|
with:
|
2023-08-23 00:45:58 +00:00
|
|
|
script: |
|
|
|
|
const script = require( './.github/actions/tests/slack-summary-daily/scripts/create-blocks-plugin-tests.js' )
|
|
|
|
script( { core } );
|
2023-08-15 08:51:06 +00:00
|
|
|
env:
|
2023-08-23 00:45:58 +00:00
|
|
|
UPLOAD_RESULT: ${{ steps.run-upload-plugin-test.outputs.result }}
|
|
|
|
E2E_RESULT: ${{ steps.run-e2e-composite-action.outputs.result }}
|
|
|
|
PLUGIN_NAME: ${{ matrix.plugin }}
|
|
|
|
PLUGIN_SLUG: ${{ matrix.slug }}
|
|
|
|
|
2023-08-15 08:51:06 +00:00
|
|
|
- name: Upload JSON file as artifact
|
2023-08-16 10:02:06 +00:00
|
|
|
if: success() || failure()
|
2022-10-21 16:07:53 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-08-16 00:43:49 +00:00
|
|
|
name: ${{ env.PLUGIN_SLACK_BLOCKS_ARTIFACT }}
|
2023-08-15 08:51:06 +00:00
|
|
|
path: ${{ steps.create-block-json.outputs.path }}
|
2023-08-23 00:45:58 +00:00
|
|
|
|
2023-05-13 01:31:55 +00:00
|
|
|
trunk-results:
|
|
|
|
name: Publish report on smoke tests on nightly build
|
|
|
|
if: |
|
|
|
|
( success() || failure() ) &&
|
|
|
|
! github.event.pull_request.head.repo.fork
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
needs: [e2e-tests, test-plugins, k6-tests]
|
|
|
|
steps:
|
|
|
|
- name: Create dirs
|
|
|
|
run: |
|
|
|
|
mkdir -p repo
|
|
|
|
mkdir -p artifacts/api
|
|
|
|
mkdir -p artifacts/e2e
|
|
|
|
mkdir -p output
|
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: repo
|
|
|
|
|
|
|
|
- name: Download API test report artifact
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ env.API_ARTIFACT }}
|
|
|
|
path: artifacts/api
|
|
|
|
|
|
|
|
- name: Download E2E test report artifact
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ env.E2E_ARTIFACT }}
|
|
|
|
path: artifacts/e2e
|
|
|
|
|
|
|
|
- name: Post test summary
|
|
|
|
uses: actions/github-script@v6
|
|
|
|
env:
|
|
|
|
API_SUMMARY_PATH: ${{ github.workspace }}/artifacts/api/allure-report/widgets/summary.json
|
|
|
|
E2E_PW_SUMMARY_PATH: ${{ github.workspace }}/artifacts/e2e/allure-report/widgets/summary.json
|
|
|
|
with:
|
|
|
|
result-encoding: string
|
|
|
|
script: |
|
|
|
|
const script = require( './repo/.github/workflows/scripts/prepare-test-summary-daily.js' )
|
|
|
|
return await script( { core } )
|
|
|
|
|
|
|
|
- name: Publish report
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
RUN_ID: ${{ github.run_id }}
|
|
|
|
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
|
2022-10-21 16:07:53 +00:00
|
|
|
|
2023-05-12 06:29:37 +00:00
|
|
|
plugins-results:
|
|
|
|
name: Publish report on Smoke tests on trunk with plugins
|
|
|
|
if: |
|
2023-09-01 03:39:10 +00:00
|
|
|
( success() || failure() ) &&
|
|
|
|
( needs.test-plugins.result != 'skipped' ) &&
|
2023-05-12 06:29:37 +00:00
|
|
|
! github.event.pull_request.head.repo.fork
|
|
|
|
runs-on: ubuntu-20.04
|
2023-05-13 01:31:55 +00:00
|
|
|
needs: [e2e-tests, test-plugins, k6-tests]
|
2023-05-12 06:29:37 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
|
|
|
RUN_ID: ${{ github.run_id }}
|
|
|
|
ARTIFACT: Smoke tests on trunk with ${{ matrix.plugin }} plugin installed (run ${{ github.run_number }})
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
2023-05-13 01:31:55 +00:00
|
|
|
- plugin: 'WooCommerce Payments'
|
|
|
|
slug: woocommerce-payments
|
|
|
|
- plugin: 'WooCommerce PayPal Payments'
|
|
|
|
slug: woocommerce-paypal-payments
|
|
|
|
- plugin: 'WooCommerce Shipping & Tax'
|
|
|
|
slug: woocommerce-services
|
2023-11-15 15:08:47 +00:00
|
|
|
- plugin: 'Woo Subscriptions'
|
2023-05-13 01:31:55 +00:00
|
|
|
slug: woocommerce-subscriptions
|
2023-05-12 06:29:37 +00:00
|
|
|
- plugin: 'Gutenberg'
|
|
|
|
slug: gutenberg
|
|
|
|
- plugin: 'Gutenberg - Nightly'
|
|
|
|
slug: gutenberg-nightly
|
|
|
|
steps:
|
|
|
|
- name: Download test report artifact
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ env.ARTIFACT }}
|
|
|
|
|
|
|
|
- name: Publish reports
|
|
|
|
run: |
|
|
|
|
gh workflow run publish-test-reports-daily-plugins.yml \
|
|
|
|
-f run_id=$RUN_ID \
|
|
|
|
-f artifact="${{ env.ARTIFACT }}" \
|
|
|
|
-f plugin="${{ matrix.plugin }}" \
|
|
|
|
-f slug="${{ matrix.slug }}" \
|
|
|
|
-f s3_root=public \
|
|
|
|
--repo woocommerce/woocommerce-test-reports
|
2023-08-15 08:52:20 +00:00
|
|
|
|
|
|
|
post-slack-summary:
|
|
|
|
name: Post Slack summary
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
if: |
|
2023-11-15 15:08:47 +00:00
|
|
|
github.ref_name == 'trunk' &&
|
2023-08-15 08:52:20 +00:00
|
|
|
success() || (
|
|
|
|
failure() && contains( needs.*.result, 'failure' )
|
|
|
|
)
|
|
|
|
needs:
|
|
|
|
- api-tests
|
|
|
|
- e2e-tests
|
|
|
|
- k6-tests
|
|
|
|
- test-plugins
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Download Slack blocks from plugin tests
|
2023-09-01 04:12:36 +00:00
|
|
|
if: needs.test-plugins.result != 'skipped'
|
2023-08-15 08:52:20 +00:00
|
|
|
id: download-plugin-blocks
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ env.PLUGIN_SLACK_BLOCKS_ARTIFACT }}
|
|
|
|
path: /tmp/plugin-blocks
|
|
|
|
|
|
|
|
- name: Construct Slack payload
|
|
|
|
id: construct-slack-payload
|
|
|
|
uses: actions/github-script@v6
|
|
|
|
with:
|
|
|
|
script: |
|
2023-08-23 00:45:58 +00:00
|
|
|
const script = require('./.github/actions/tests/slack-summary-daily/scripts/construct-slack-payload.js');
|
|
|
|
await script( { context, core, github } );
|
2023-08-15 08:52:20 +00:00
|
|
|
env:
|
|
|
|
API_RESULT: ${{ needs.api-tests.outputs.test-result }}
|
2023-09-01 05:13:08 +00:00
|
|
|
E2E_RESULT: ${{ needs.e2e-tests.outputs.test-result || needs.e2e-tests.result }}
|
|
|
|
k6_RESULT: ${{ needs.k6-tests.outputs.test-result || needs.k6-tests.result }}
|
2023-08-15 08:52:20 +00:00
|
|
|
PLUGINS_BLOCKS_PATH: ${{ steps.download-plugin-blocks.outputs.download-path }}
|
2023-09-01 05:13:46 +00:00
|
|
|
PLUGIN_TESTS_RESULT: ${{ needs.test-plugins.result }}
|
2023-08-15 08:52:20 +00:00
|
|
|
|
2023-08-16 08:41:12 +00:00
|
|
|
- name: Send Slack message
|
2023-08-15 08:52:20 +00:00
|
|
|
id: send-slack-message
|
|
|
|
uses: slackapi/slack-github-action@v1.23.0
|
|
|
|
with:
|
2023-08-16 08:44:11 +00:00
|
|
|
channel-id: ${{ secrets.DAILY_TEST_SLACK_CHANNEL }}
|
2023-08-15 08:52:20 +00:00
|
|
|
payload: ${{ steps.construct-slack-payload.outputs.payload }}
|
|
|
|
env:
|
|
|
|
SLACK_BOT_TOKEN: ${{ secrets.E2E_SLACK_TOKEN }}
|