Comment all other jobs
This commit is contained in:
parent
074c8b871a
commit
93bb793178
|
@ -16,175 +16,174 @@ concurrency:
|
|||
permissions: {}
|
||||
|
||||
jobs:
|
||||
api-tests:
|
||||
name: API tests on nightly build
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: read
|
||||
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 }}
|
||||
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
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
# api-tests:
|
||||
# name: API tests on nightly build
|
||||
# runs-on: ubuntu-20.04
|
||||
# permissions:
|
||||
# contents: read
|
||||
# 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 }}
|
||||
# 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
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
|
||||
- name: Setup WooCommerce Monorepo
|
||||
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
with:
|
||||
install-filters: woocommerce
|
||||
build: false
|
||||
# - name: Setup WooCommerce Monorepo
|
||||
# uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
# with:
|
||||
# install-filters: woocommerce
|
||||
# build: false
|
||||
|
||||
- name: Download and install Chromium browser.
|
||||
working-directory: plugins/woocommerce
|
||||
run: pnpm exec playwright install chromium
|
||||
# - name: Download and install Chromium browser.
|
||||
# working-directory: plugins/woocommerce
|
||||
# run: pnpm exec playwright install chromium
|
||||
|
||||
- name: Run 'Update WooCommerce' test.
|
||||
working-directory: plugins/woocommerce
|
||||
env:
|
||||
UPDATE_WC: nightly
|
||||
run: pnpm exec playwright test --config=tests/e2e-pw/daily.playwright.config.js update-woocommerce.spec.js
|
||||
# - name: Run 'Update WooCommerce' test.
|
||||
# working-directory: plugins/woocommerce
|
||||
# env:
|
||||
# UPDATE_WC: nightly
|
||||
# run: pnpm exec playwright test --config=tests/e2e-pw/daily.playwright.config.js update-woocommerce.spec.js
|
||||
|
||||
- name: Run API tests.
|
||||
working-directory: plugins/woocommerce
|
||||
env:
|
||||
USER_KEY: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
||||
USER_SECRET: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
||||
run: pnpm exec playwright test --config=tests/api-core-tests/playwright.config.js hello.test.js
|
||||
# - name: Run API tests.
|
||||
# working-directory: plugins/woocommerce
|
||||
# env:
|
||||
# USER_KEY: ${{ secrets.SMOKE_TEST_ADMIN_USER }}
|
||||
# USER_SECRET: ${{ secrets.SMOKE_TEST_ADMIN_PASSWORD }}
|
||||
# run: pnpm exec playwright test --config=tests/api-core-tests/playwright.config.js hello.test.js
|
||||
|
||||
- name: Generate API 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: Generate API 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 API test report
|
||||
if: success() || failure()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ env.API_ARTIFACT }}
|
||||
path: |
|
||||
${{ env.ALLURE_RESULTS_DIR }}
|
||||
${{ env.ALLURE_REPORT_DIR }}
|
||||
if-no-files-found: ignore
|
||||
retention-days: 5
|
||||
# - name: Archive API test report
|
||||
# if: success() || failure()
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: ${{ env.API_ARTIFACT }}
|
||||
# path: |
|
||||
# ${{ env.ALLURE_RESULTS_DIR }}
|
||||
# ${{ env.ALLURE_REPORT_DIR }}
|
||||
# if-no-files-found: ignore
|
||||
# retention-days: 5
|
||||
|
||||
e2e-tests:
|
||||
name: E2E tests on nightly build
|
||||
if: false # mytodo re-enable
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: read
|
||||
needs: [api-tests]
|
||||
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
|
||||
# e2e-tests:
|
||||
# name: E2E tests on nightly build
|
||||
# runs-on: ubuntu-20.04
|
||||
# permissions:
|
||||
# contents: read
|
||||
# needs: [api-tests]
|
||||
# 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
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
|
||||
- name: Setup WooCommerce Monorepo
|
||||
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
with:
|
||||
install-filters: woocommerce
|
||||
build: false
|
||||
# - name: Setup WooCommerce Monorepo
|
||||
# uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
# with:
|
||||
# install-filters: woocommerce
|
||||
# build: false
|
||||
|
||||
- name: Download and install Chromium browser.
|
||||
working-directory: plugins/woocommerce
|
||||
run: pnpm exec playwright install chromium
|
||||
# - name: Download and install Chromium browser.
|
||||
# working-directory: plugins/woocommerce
|
||||
# run: pnpm exec playwright install chromium
|
||||
|
||||
- name: Run E2E tests.
|
||||
timeout-minutes: 60
|
||||
working-directory: plugins/woocommerce
|
||||
env:
|
||||
E2E_MAX_FAILURES: 25
|
||||
RESET_SITE: true
|
||||
run: pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js
|
||||
# - name: Run E2E tests.
|
||||
# timeout-minutes: 60
|
||||
# working-directory: plugins/woocommerce
|
||||
# env:
|
||||
# E2E_MAX_FAILURES: 25
|
||||
# RESET_SITE: true
|
||||
# run: pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js
|
||||
|
||||
- name: Generate Playwright 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: Generate Playwright 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_ARTIFACT }}
|
||||
path: |
|
||||
${{ env.ALLURE_RESULTS_DIR }}
|
||||
${{ env.ALLURE_REPORT_DIR }}
|
||||
if-no-files-found: ignore
|
||||
retention-days: 5
|
||||
# - name: Archive E2E test report
|
||||
# if: success() || failure()
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: ${{ env.E2E_ARTIFACT }}
|
||||
# path: |
|
||||
# ${{ env.ALLURE_RESULTS_DIR }}
|
||||
# ${{ env.ALLURE_REPORT_DIR }}
|
||||
# if-no-files-found: ignore
|
||||
# retention-days: 5
|
||||
|
||||
k6-tests:
|
||||
name: k6 tests on nightly build
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: read
|
||||
needs: [api-tests]
|
||||
# if: success() || failure()
|
||||
if: false # mytodo re-enable
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
# k6-tests:
|
||||
# name: k6 tests on nightly build
|
||||
# runs-on: ubuntu-20.04
|
||||
# permissions:
|
||||
# contents: read
|
||||
# needs: [api-tests]
|
||||
# if: success() || failure()
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
|
||||
- name: Setup WooCommerce Monorepo
|
||||
uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
with:
|
||||
install-filters: woocommerce
|
||||
build: false
|
||||
# - name: Setup WooCommerce Monorepo
|
||||
# uses: ./.github/actions/setup-woocommerce-monorepo
|
||||
# with:
|
||||
# install-filters: woocommerce
|
||||
# build: false
|
||||
|
||||
- name: Download and install Chromium browser.
|
||||
working-directory: plugins/woocommerce
|
||||
run: pnpm exec playwright install chromium
|
||||
# - name: Download and install Chromium browser.
|
||||
# working-directory: plugins/woocommerce
|
||||
# run: pnpm exec playwright install chromium
|
||||
|
||||
- name: Update performance test site with E2E test
|
||||
working-directory: plugins/woocommerce
|
||||
env:
|
||||
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 }}
|
||||
UPDATE_WC: nightly
|
||||
DEFAULT_TIMEOUT_OVERRIDE: 120000
|
||||
run: |
|
||||
pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js update-woocommerce.spec.js
|
||||
continue-on-error: true
|
||||
# - name: Update performance test site with E2E test
|
||||
# working-directory: plugins/woocommerce
|
||||
# env:
|
||||
# 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 }}
|
||||
# UPDATE_WC: nightly
|
||||
# DEFAULT_TIMEOUT_OVERRIDE: 120000
|
||||
# run: |
|
||||
# pnpm exec playwright test --config=tests/e2e-pw/playwright.config.js update-woocommerce.spec.js
|
||||
# continue-on-error: true
|
||||
|
||||
- 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
|
||||
# - 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
|
||||
|
||||
- name: Run k6 smoke tests
|
||||
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
|
||||
# - name: Run k6 smoke tests
|
||||
# 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
|
||||
|
||||
test-plugins:
|
||||
name: Smoke tests on trunk with ${{ matrix.plugin }} plugin installed
|
||||
runs-on: ubuntu-20.04
|
||||
permissions:
|
||||
contents: read
|
||||
needs: [api-tests]
|
||||
# mytodo uncomment
|
||||
# needs: [api-tests]
|
||||
env:
|
||||
USE_WP_ENV: 1
|
||||
ALLURE_RESULTS_DIR: ${{ github.workspace }}/plugins/woocommerce/tests/e2e-pw/allure-results
|
||||
|
@ -251,63 +250,62 @@ jobs:
|
|||
if-no-files-found: ignore
|
||||
retention-days: 5
|
||||
|
||||
trunk-results:
|
||||
name: Publish report on smoke tests on nightly build
|
||||
# if: |
|
||||
# ( success() || failure() ) &&
|
||||
# ! github.event.pull_request.head.repo.fork
|
||||
if: false # mytodo re-enable
|
||||
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
|
||||
# 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: 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 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: 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: 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
|
||||
# - 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
|
||||
|
||||
plugins-results:
|
||||
name: Publish report on Smoke tests on trunk with plugins
|
||||
|
@ -315,7 +313,8 @@ jobs:
|
|||
( success() || failure() ) &&
|
||||
! github.event.pull_request.head.repo.fork
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [e2e-tests, test-plugins, k6-tests]
|
||||
# needs: [e2e-tests, test-plugins, k6-tests]
|
||||
needs: [test-plugins] # mytodo revert to the above
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.REPORTS_TOKEN }}
|
||||
RUN_ID: ${{ github.run_id }}
|
||||
|
@ -344,8 +343,6 @@ jobs:
|
|||
with:
|
||||
name: ${{ env.ARTIFACT }}
|
||||
|
||||
# TODO: Add step to post job summary
|
||||
|
||||
- name: Get slug
|
||||
id: get-slug
|
||||
uses: actions/github-script@v6
|
||||
|
|
Loading…
Reference in New Issue