woocommerce/.github/workflows/smoke-test-daily.yml

252 lines
9.9 KiB
YAML
Raw Normal View History

2021-04-01 20:17:34 +00:00
name: Smoke test daily
on:
schedule:
- cron: '25 3 * * *'
2022-05-17 19:29:16 +00:00
workflow_dispatch:
2021-04-01 20:17:34 +00:00
jobs:
login-run:
name: Daily smoke test on trunk.
runs-on: ubuntu-20.04
env:
API_TEST_REPORT_DIR: ${{ github.workspace }}/api-test-report
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
outputs:
commit_message: ${{ steps.get_commit_message.outputs.commit_message }}
steps:
- uses: actions/checkout@v3
with:
ref: trunk
2021-04-01 20:17:34 +00:00
- uses: ./.github/actions/cache-deps
with:
workflow_name: smoke-test-daily
workflow_cache: ${{ secrets.WORKFLOW_CACHE }}
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Install and Build
uses: ./.github/actions/install-build
- name: Install Jest
run: npm install -g jest
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
- name: Get latest commit message
id: get_commit_message
run: |
COMMIT_MESSAGE=$(git log --pretty=format:%s -1)
echo "::set-output name=commit_message::$COMMIT_MESSAGE"
- name: Run E2E smoke test.
2022-05-12 13:34:55 +00:00
working-directory: plugins/woocommerce
env:
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_URL }}
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
2022-05-12 13:34:55 +00:00
WC_E2E_SCREENSHOTS: 1
E2E_RETEST: 1
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
2022-05-12 13:34:55 +00:00
UPDATE_WC: 1
DEFAULT_TIMEOUT_OVERRIDE: 120000
run: |
pnpm exec wc-e2e docker:up
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
pnpm exec wc-e2e test:e2e
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
- name: Run API smoke tests
if: always()
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
id: run_api_tests
working-directory: plugins/woocommerce
env:
BASE_URL: ${{ secrets.SMOKE_TEST_URL }}
USER_KEY: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
USER_SECRET: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
DEFAULT_TIMEOUT_OVERRIDE: 120000
run: pnpm exec wc-api-tests test api
- name: Archive API test report
if: |
always() &&
(
steps.run_api_tests.conclusion != 'cancelled' ||
steps.run_api_tests.conclusion != 'skipped'
)
uses: actions/upload-artifact@v3
with:
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
name: api-test-report---daily
path: |
${{ env.API_TEST_REPORT_DIR }}/allure-results
${{ env.API_TEST_REPORT_DIR }}/allure-report
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
retention-days: 5
2022-05-12 13:34:55 +00:00
- name: Update performance test site with E2E test
if: always()
working-directory: plugins/woocommerce
env:
SMOKE_TEST_URL: ${{ secrets.SMOKE_TEST_PERF_URL }}/
SMOKE_TEST_ADMIN_USER: ${{ secrets.SMOKE_TEST_PERF_ADMIN_USER }}
SMOKE_TEST_ADMIN_PASSWORD: ${{ secrets.SMOKE_TEST_PERF_ADMIN_PASSWORD }}
SMOKE_TEST_ADMIN_USER_EMAIL: ${{ secrets.SMOKE_TEST_ADMIN_USER_EMAIL }}
SMOKE_TEST_CUSTOMER_USER: ${{ secrets.SMOKE_TEST_CUSTOMER_USER }}
SMOKE_TEST_CUSTOMER_PASSWORD: ${{ secrets.SMOKE_TEST_CUSTOMER_PASSWORD }}
WC_E2E_SCREENSHOTS: 1
E2E_RETEST: 1
E2E_RETRY_TIMES: 0
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
UPDATE_WC: 1
DEFAULT_TIMEOUT_OVERRIDE: 120000
run: |
pnpx wc-e2e test:e2e tests/e2e/specs/smoke-tests/update-woocommerce.js
continue-on-error: true
- name: Install k6
if: always()
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
- name: Run k6 smoke tests
if: always()
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: 274
run: |
./k6 run plugins/woocommerce/tests/performance/tests/gh-action-daily-ext-requests.js
2022-05-12 13:34:55 +00:00
build:
name: Build zip for PR
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
2022-05-12 13:34:55 +00:00
- uses: ./.github/actions/cache-deps
2022-05-12 13:34:55 +00:00
with:
workflow_name: smoke-test-daily
workflow_cache: ${{ secrets.WORKFLOW_CACHE }}
2022-05-12 13:34:55 +00:00
- name: Install PNPM
run: npm install -g pnpm@^6.24.2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Build zip
working-directory: plugins/woocommerce
run: bash bin/build-zip.sh
- name: Upload the zip file as an artifact
uses: actions/upload-artifact@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: woocommerce
path: plugins/woocommerce/woocommerce.zip
2022-05-12 13:34:55 +00:00
retention-days: 7
test-plugins:
name: Smoke tests with ${{ matrix.plugin }} plugin installed
runs-on: ubuntu-20.04
needs: [build]
strategy:
fail-fast: false
matrix:
include:
- plugin: 'WooCommerce Payments'
repo: 'automattic/woocommerce-payments'
- plugin: 'WooCommerce PayPal Payments'
repo: 'woocommerce/woocommerce-paypal-payments'
- plugin: 'WooCommerce Shipping & Tax'
repo: 'automattic/woocommerce-services'
- plugin: 'WooCommerce Subscriptions'
repo: WC_SUBSCRIPTIONS_REPO
private: true
- plugin: 'WordPress SEO' # Yoast SEO in the UI, but the slug is wordpress-seo
repo: 'Yoast/wordpress-seo'
- plugin: 'Contact Form 7'
repo: 'takayukister/contact-form-7'
steps:
- name: Create dirs.
run: |
mkdir -p package/woocommerce
mkdir -p tmp/woocommerce
- uses: actions/checkout@v3
with:
path: package/woocommerce
- uses: ./package/woocommerce/.github/actions/cache-deps
2022-05-12 13:34:55 +00:00
with:
workflow_name: smoke-test-daily
workflow_cache: ${{ secrets.WORKFLOW_CACHE }}
2022-05-12 13:34:55 +00:00
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
- name: Install and Build
uses: ./package/woocommerce/.github/actions/install-build
with:
working_directory: package/woocommerce
- name: Download WooCommerce ZIP.
2022-04-21 18:46:30 +00:00
uses: actions/download-artifact@v3
with:
name: woocommerce
path: tmp
- name: Extract and replace WooCommerce zip.
working-directory: tmp
run: |
unzip woocommerce.zip -d .
rsync -a woocommerce/* ../package/woocommerce/plugins/woocommerce/
2022-05-12 13:34:55 +00:00
- name: Load docker images and start containers.
working-directory: package/woocommerce
run: pnpm docker:up --filter=woocommerce
- name: Run tests command.
working-directory: package/woocommerce/plugins/woocommerce
env:
WC_E2E_SCREENSHOTS: 1
E2E_SLACK_TOKEN: ${{ secrets.SMOKE_TEST_SLACK_TOKEN }}
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
E2E_SLACK_CHANNEL: ${{ secrets.SMOKE_TEST_SLACK_CHANNEL }}
PLUGIN_REPOSITORY: ${{ matrix.private && secrets[matrix.repo] || matrix.repo }}
PLUGIN_NAME: ${{ matrix.plugin }}
GITHUB_TOKEN: ${{ secrets.E2E_GH_TOKEN }}
run: |
pnpm exec wc-e2e test:e2e tests/e2e/specs/smoke-tests/upload-plugin.js
pnpm exec wc-e2e test:e2e
publish-test-reports:
name: Publish test reports
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
if: always()
runs-on: ubuntu-20.04
needs: [login-run, build, test-plugins]
env:
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
RUN_ID: ${{ github.run_id }}
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
API_ARTIFACT: api-test-report---daily
COMMIT_MESSAGE: ${{ needs.login-run.outputs.commit_message }}
steps:
- name: Publish API test report
run: |
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
gh workflow run publish-test-reports-daily.yml \
-f run_id=$RUN_ID \
REP: Post daily smoke test report on Slack (#33203) * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Separate job for api test * Remove unnecessary comment * Use ubuntu 20.04 in job "publish-test-report" * Simplify syntax in "if" condition * Temporarily add push trigger for testing * Temporarily disable running jest e2e tests for testing * Remove unnecessary OR operator * try: disable certain jobs for testing * try: run 'hello' api test for testing * Implement timeout override in API tests * Allow workflow to override timeout of api tests * Correct parsing of timeout override * try: temporarily disable e2e job * try: make api test verbose for troubleshooting * try: temporarily disable some install steps for testing * Correct smoke test env vars * try: run all api tests * Re-enable install-build steps * Correct smoke test env var values * Temporarily disable running all e2e tests after WC upgrade * Remove unnecessary flag for daily smoke test runs * Use different workflow for publishing daily smoke test report * Use env vars instead of github expressions in accessing job outputs * Correct multiline syntax * Correct api_artifact input value * Take only the first line of commit message * Correct passing of input value * Re-enable jobs before submitting for review * Add push trigger for final testing * Re-enable e2e tests, remove push trigger before merge * Fix spacing * Correct slack channel id
2022-05-31 18:57:04 +00:00
-f api_artifact=$API_ARTIFACT \
-f commit_message="$COMMIT_MESSAGE" \
--repo woocommerce/woocommerce-test-reports