Bumps the github-actions-updates group with 15 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `3` | `4` | | [actions/setup-node](https://github.com/actions/setup-node) | `4.0.2` | `4.1.0` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `3` | `4` | | [docker/login-action](https://github.com/docker/login-action) | `3.0.0` | `3.3.0` | | [docker/build-push-action](https://github.com/docker/build-push-action) | `5.3.0` | `6.9.0` | | [github/codeql-action](https://github.com/github/codeql-action) | `2` | `3` | | [actions/setup-go](https://github.com/actions/setup-go) | `2` | `5` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `3` | `4` | | [tj-actions/changed-files](https://github.com/tj-actions/changed-files) | `39.2.3` | `45.0.3` | | [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) | `3.7.7` | `4.3.1` | | [ossf/scorecard-action](https://github.com/ossf/scorecard-action) | `2.1.2` | `2.4.0` | | [getsentry/action-release](https://github.com/getsentry/action-release) | `1.3.0` | `1.7.0` | | [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) | `3.1.2` | `3.7.0` | | [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) | `3.1.0` | `3.7.1` | | [actions/github-script](https://github.com/actions/github-script) | `6.4.1` | `7.0.1` | Updates `actions/checkout` from 3 to 4 - [Release notes](https://github.com/actions/checkout/releases) - [Commits](https://github.com/actions/checkout/compare/v3...v4) Updates `actions/setup-node` from 4.0.2 to 4.1.0 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](60edb5dd54...39370e3970) Updates `actions/upload-artifact` from 3 to 4 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) Updates `docker/login-action` from 3.0.0 to 3.3.0 - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v3...9780b0c442fbb1117ed29e0efdff1e18412f7567) Updates `docker/build-push-action` from 5.3.0 to 6.9.0 - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](2cdde995de...4f58ea7922) Updates `github/codeql-action` from 2 to 3 - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](https://github.com/github/codeql-action/compare/v2...v3) Updates `actions/setup-go` from 2 to 5 - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/v2...v5) Updates `actions/download-artifact` from 3 to 4 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v3...v4) Updates `tj-actions/changed-files` from 39.2.3 to 45.0.3 - [Release notes](https://github.com/tj-actions/changed-files/releases) - [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md) - [Commits](95690f9ece...c3a1bb2c99) Updates `mikepenz/action-junit-report` from 3.7.7 to 4.3.1 - [Release notes](https://github.com/mikepenz/action-junit-report/releases) - [Commits](https://github.com/mikepenz/action-junit-report/compare/v3.7.7...db71d41eb79864e25ab0337e395c352e84523afe) Updates `ossf/scorecard-action` from 2.1.2 to 2.4.0 - [Release notes](https://github.com/ossf/scorecard-action/releases) - [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md) - [Commits](e38b1902ae...62b2cac7ed) Updates `getsentry/action-release` from 1.3.0 to 1.7.0 - [Release notes](https://github.com/getsentry/action-release/releases) - [Commits](85e0095193...e769183448) Updates `sigstore/cosign-installer` from 3.1.2 to 3.7.0 - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](11086d2504...dc72c7d5c4) Updates `docker/setup-buildx-action` from 3.1.0 to 3.7.1 - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](0d103c3126...c47758b77c) Updates `actions/github-script` from 6.4.1 to 7.0.1 - [Release notes](https://github.com/actions/github-script/releases) - [Commits](d7906e4ad0...60a0d83039) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: docker/login-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: docker/build-push-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: tj-actions/changed-files dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: mikepenz/action-junit-report dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates - dependency-name: ossf/scorecard-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: getsentry/action-release dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: sigstore/cosign-installer dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: docker/setup-buildx-action dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions-updates - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions-updates ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
334 строки
19 KiB
YAML
334 строки
19 KiB
YAML
---
|
|
name: E2E Tests
|
|
on:
|
|
# For PRs, this workflow gets triggered from the Argo Events platform.
|
|
# Check the following repo for details: https://github.com/mattermost/delivery-platform
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
type: string
|
|
description: Git ref to test. Must be a full commit SHA for PR testing, and a tag for release testing. Ignored for daily tests.
|
|
required: false
|
|
PR_NUMBER:
|
|
type: string
|
|
description: PR number (if applicable)
|
|
required: false
|
|
ROLLING_RELEASE_FROM_TAG:
|
|
type: string
|
|
description: Mattermost release git tag for RollingRelease tests. Optional.
|
|
required: false
|
|
MM_ENV:
|
|
type: string
|
|
required: false
|
|
description: A comma-separated list of environment variables to set for the server. Spaces are not supported.
|
|
MM_SERVICE_OVERRIDES:
|
|
type: string
|
|
required: false
|
|
description: A comma-separated list of service overrides. E.g. "-elasticsearch,+opensearch"
|
|
REPORT_TYPE:
|
|
type: choice
|
|
description: The context this report is being generated in
|
|
options:
|
|
- PR
|
|
- RELEASE
|
|
- RELEASE_CLOUD
|
|
- MASTER
|
|
- MASTER_UNSTABLE
|
|
- CLOUD
|
|
- CLOUD_UNSTABLE
|
|
- NONE
|
|
default: NONE
|
|
RUN_CYPRESS:
|
|
type: boolean
|
|
description: Enable Cypress run
|
|
default: true
|
|
RUN_PLAYWRIGHT:
|
|
type: boolean
|
|
description: Enable Playwright run
|
|
default: true
|
|
|
|
concurrency:
|
|
group: "${{ github.workflow }}-${{ inputs.REPORT_TYPE }}-${{ inputs.PR_NUMBER || inputs.ref }}-${{ inputs.MM_ENV }}"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
generate-test-variables:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
issues: write
|
|
pull-requests: write
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
outputs:
|
|
commit_sha: "${{ steps.generate.outputs.commit_sha }}"
|
|
BRANCH: "${{ steps.generate.outputs.BRANCH }}"
|
|
SERVER_IMAGE: "${{ steps.generate.outputs.SERVER_IMAGE }}"
|
|
status_check_context: "${{ steps.generate.outputs.status_check_context }}"
|
|
workers_number: "${{ steps.generate.outputs.workers_number }}"
|
|
server_uppercase: "${{ steps.generate.outputs.server_uppercase }}" # Required for license selection
|
|
SERVER: "${{ steps.generate.outputs.SERVER }}"
|
|
ENABLED_DOCKER_SERVICES: "${{ steps.generate.outputs.ENABLED_DOCKER_SERVICES }}"
|
|
TEST_FILTER_CYPRESS: "${{ steps.generate.outputs.TEST_FILTER_CYPRESS }}"
|
|
TEST_FILTER_PLAYWRIGHT: "tests/ --project=chrome" # Note: Run on chrome but eventually will enable to all projects which include firefox and ipad.
|
|
BUILD_ID: "${{ steps.generate.outputs.BUILD_ID }}"
|
|
TM4J_ENABLE: "${{ steps.generate.outputs.TM4J_ENABLE }}"
|
|
REPORT_TYPE: "${{ steps.generate.outputs.REPORT_TYPE }}"
|
|
ROLLING_RELEASE_commit_sha: "${{ steps.generate.outputs.ROLLING_RELEASE_commit_sha }}"
|
|
ROLLING_RELEASE_SERVER_IMAGE: "${{ steps.generate.outputs.ROLLING_RELEASE_SERVER_IMAGE }}"
|
|
WORKFLOW_RUN_URL: "${{steps.generate.outputs.WORKFLOW_RUN_URL}}"
|
|
CYCLE_URL: "${{steps.generate.outputs.CYCLE_URL}}"
|
|
env:
|
|
GH_TOKEN: "${{ github.token }}"
|
|
REF: "${{ inputs.ref || github.sha }}"
|
|
PR_NUMBER: "${{ inputs.PR_NUMBER || '' }}"
|
|
REPORT_TYPE: "${{ inputs.REPORT_TYPE }}"
|
|
ROLLING_RELEASE_FROM_TAG: "${{ inputs.ROLLING_RELEASE_FROM_TAG }}"
|
|
AUTOMATION_DASHBOARD_URL: "${{ secrets.MM_E2E_AUTOMATION_DASHBOARD_URL }}"
|
|
# We could exclude the @smoke group for PRs, but then we wouldn't have it in the report
|
|
TEST_FILTER_CYPRESS_PR: >-
|
|
--stage="@prod"
|
|
--excludeGroup="@te_only,@cloud_only,@high_availability"
|
|
--sortFirst="@compliance_export,@elasticsearch,@ldap_group,@ldap"
|
|
--sortLast="@saml,@keycloak,@plugin,@plugins_uninstall,@mfa,@license_removal"
|
|
TEST_FILTER_CYPRESS_PROD_ONPREM: >-
|
|
--stage="@prod"
|
|
--excludeGroup="@te_only,@cloud_only,@high_availability"
|
|
--sortFirst="@compliance_export,@elasticsearch,@ldap_group,@ldap,@playbooks"
|
|
--sortLast="@saml,@keycloak,@plugin,@plugins_uninstall,@mfa,@license_removal"
|
|
TEST_FILTER_CYPRESS_PROD_CLOUD: >-
|
|
--stage="@prod"
|
|
--excludeGroup="@not_cloud,@cloud_trial,@e20_only,@te_only,@high_availability,@license_removal"
|
|
--sortFirst="@compliance_export,@elasticsearch,@ldap_group,@ldap,@playbooks"
|
|
--sortLast="@saml,@keycloak,@plugin,@plugins_uninstall,@mfa"
|
|
MM_ENV: "${{ inputs.MM_ENV || '' }}"
|
|
MM_SERVICE_OVERRIDES: "${{ inputs.MM_SERVICE_OVERRIDES }}"
|
|
steps:
|
|
- name: ci/checkout-repo
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: "${{ inputs.ref || github.sha }}"
|
|
fetch-depth: 0
|
|
- name: ci/generate-test-variables
|
|
id: generate
|
|
run: |
|
|
MM_ENV_HASH=$(md5sum -z <<<"$MM_ENV" | cut -c-8)
|
|
if grep -q CLOUD <<<"$REPORT_TYPE"; then
|
|
SERVER=cloud
|
|
else
|
|
SERVER=onprem
|
|
fi
|
|
case "$REPORT_TYPE" in
|
|
NONE | PR)
|
|
### Populate support variables
|
|
_COMMIT_SHA_COMPUTED=$(git rev-parse --verify "$REF") # NB: not actually used for resolving the commit; it's only to double check the value of 'inputs.ref'
|
|
### For image tag generation: utilize 'inputs.ref', assume that it is a full commit SHA
|
|
COMMIT_SHA="${REF}"
|
|
BRANCH="server-pr-${PR_NUMBER}" # For reference, the real branch name may be retrievable with command: 'jq -r .head.ref <pr.json'
|
|
SERVER_IMAGE_TAG="${COMMIT_SHA::7}"
|
|
SERVER_IMAGE_ORG=mattermostdevelopment
|
|
BUILD_ID_SUFFIX="${REPORT_TYPE@L}-${SERVER}-ent"
|
|
WORKERS_NUMBER=20
|
|
TEST_FILTER_CYPRESS="$TEST_FILTER_CYPRESS_PR"
|
|
COMPUTED_REPORT_TYPE="${REPORT_TYPE}"
|
|
### Run sanity assertions after variable generations
|
|
[ "$REF" = "${_COMMIT_SHA_COMPUTED}" ] # 'inputs.ref' must be a full commit hash, and the commit must exist
|
|
[ "$REPORT_TYPE" != "PR" ] || [ "$PR_NUMBER" -gt "0" ] # If report type is PR, then PR_NUMBER must be set to a number
|
|
;;
|
|
MASTER | MASTER_UNSTABLE | CLOUD | CLOUD_UNSTABLE)
|
|
### Populate support variables
|
|
_IS_TEST_UNSTABLE=$(sed -n -E 's/^.*(UNSTABLE).*$/\1/p' <<< "$REPORT_TYPE") # The variable's value is 'UNSTABLE' if report type is for unstable tests, otherwise it's empty
|
|
_TEST_FILTER_CYPRESS_VARIABLE="TEST_FILTER_CYPRESS_PROD_${SERVER@U}"
|
|
### For ref and image tag generation: ignore 'inputs.ref', and use master branch directly. Note that 'COMMIT_SHA' will be used for reporting the test result, and for checking out the testing scripts and test cases
|
|
COMMIT_SHA="$(git rev-parse --verify origin/master)"
|
|
BRANCH=master
|
|
SERVER_IMAGE_TAG=master
|
|
SERVER_IMAGE_ORG=mattermostdevelopment
|
|
BUILD_ID_SUFFIX="${_IS_TEST_UNSTABLE:+unstable-}daily-${SERVER}-ent"
|
|
BUILD_ID_SUFFIX_IN_STATUS_CHECK=true
|
|
WORKERS_NUMBER=10 # Daily tests are not time critical, and it's more efficient to run on fewer workers
|
|
TEST_FILTER_CYPRESS="${!_TEST_FILTER_CYPRESS_VARIABLE} ${_IS_TEST_UNSTABLE:+--invert}"
|
|
TM4J_ENABLE=true
|
|
COMPUTED_REPORT_TYPE="${REPORT_TYPE}"
|
|
;;
|
|
RELEASE | RELEASE_CLOUD)
|
|
### Populate support variables
|
|
_TEST_FILTER_CYPRESS_VARIABLE="TEST_FILTER_CYPRESS_PROD_${SERVER@U}"
|
|
### For ref and image tag generation: assume the 'inputs.ref' is a tag, and use the first two digits to construct the branch name
|
|
COMMIT_SHA="$(git rev-parse --verify HEAD)"
|
|
BRANCH=$(sed -E "s/v([0-9]+)\.([0-9]+)\..+$/release-\1.\2/g" <<<$REF)
|
|
SERVER_IMAGE_TAG="$(cut -c2- <<<$REF)" # Remove the leading 'v' from the given tag name, to generate the docker image tag
|
|
SERVER_IMAGE_ORG=mattermost
|
|
BUILD_ID_SUFFIX="release-${SERVER}-ent"
|
|
BUILD_ID_SUFFIX_IN_STATUS_CHECK=true
|
|
WORKERS_NUMBER=20
|
|
TEST_FILTER_CYPRESS="${!_TEST_FILTER_CYPRESS_VARIABLE}"
|
|
TM4J_ENABLE=true
|
|
COMPUTED_REPORT_TYPE=RELEASE
|
|
### Run sanity assertions after variable generations
|
|
git show-ref --verify "refs/tags/${REF}" # 'inputs.ref' must be a tag, for release report types
|
|
git show-ref --verify "refs/remotes/origin/${BRANCH}" # The release branch computed from the given tag must exist
|
|
;;
|
|
*)
|
|
echo "Fatal: unimplemented test type. Aborting."
|
|
exit 1
|
|
esac
|
|
if [ -n "$ROLLING_RELEASE_FROM_TAG" ]; then
|
|
ROLLING_RELEASE_COMMIT_SHA=$(git rev-parse --verify "$ROLLING_RELEASE_FROM_TAG")
|
|
ROLLING_RELEASE_SERVER_IMAGE_TAG=$(echo "$ROLLING_RELEASE_FROM_TAG" | sed 's/^v//') # Remove the leading 'v' from the given tag name, to generate the docker image tag
|
|
ROLLING_RELEASE_SERVER_IMAGE="mattermost/mattermost-enterprise-edition:${ROLLING_RELEASE_SERVER_IMAGE_TAG}"
|
|
BUILD_ID_SUFFIX="rolling${ROLLING_RELEASE_FROM_TAG/-/_}-$BUILD_ID_SUFFIX"
|
|
BUILD_ID_SUFFIX_IN_STATUS_CHECK=true
|
|
WORKERS_NUMBER=10 # Rolling release tests are particularly impacted by increased parallelism. It's more efficient to run on fewer workers
|
|
### Run sanity assertions after variable generations
|
|
git show-ref --verify "refs/tags/${ROLLING_RELEASE_FROM_TAG}" # 'inputs.ROLLING_RELEASE_FROM_TAG' must be a tag, for release report types
|
|
fi
|
|
ENABLED_DOCKER_SERVICES="postgres inbucket minio openldap elasticsearch keycloak"
|
|
for SVC_OP in $(tr , ' '<<<"$MM_SERVICE_OVERRIDES"); do
|
|
OP=$(cut -c1 <<<$SVC_OP)
|
|
SVC=$(cut -c2- <<<$SVC_OP)
|
|
case "$OP" in
|
|
"+") ENABLED_DOCKER_SERVICES="$ENABLED_DOCKER_SERVICES $SVC" ;;
|
|
"-") ENABLED_DOCKER_SERVICES=$(sed -E "s:(^| )${SVC}( |\$): :g" <<<"$ENABLED_DOCKER_SERVICES") ;;
|
|
*) echo "Invalid MM_SERVICE_OVERRIDE value: $SVC_OP"; exit 1 ;;
|
|
esac
|
|
done
|
|
# BUILD_ID format: $pipelineID-$imageTag-$testType-$serverType-$serverEdition
|
|
# Reference on BUILD_ID parsing: https://github.com/saturninoabril/automation-dashboard/blob/175891781bf1072c162c58c6ec0abfc5bcb3520e/lib/common_utils.ts#L3-L23
|
|
BUILD_ID="${{ github.run_id }}_${{ github.run_attempt }}-${SERVER_IMAGE_TAG}-${BUILD_ID_SUFFIX}"
|
|
echo "commit_sha=${COMMIT_SHA}" >> $GITHUB_OUTPUT
|
|
echo "BRANCH=${BRANCH}" >> $GITHUB_OUTPUT
|
|
echo "SERVER_IMAGE=${SERVER_IMAGE_ORG}/mattermost-enterprise-edition:${SERVER_IMAGE_TAG}" >> $GITHUB_OUTPUT
|
|
echo "SERVER=${SERVER}" >> $GITHUB_OUTPUT
|
|
echo "server_uppercase=${SERVER@U}" >> $GITHUB_OUTPUT
|
|
echo "ENABLED_DOCKER_SERVICES=${ENABLED_DOCKER_SERVICES}" >> $GITHUB_OUTPUT
|
|
echo "status_check_context=E2E Tests/test${BUILD_ID_SUFFIX_IN_STATUS_CHECK:+-$BUILD_ID_SUFFIX}${MM_ENV:+/$MM_ENV_HASH}" >> $GITHUB_OUTPUT
|
|
echo "workers_number=${WORKERS_NUMBER}" >> $GITHUB_OUTPUT
|
|
echo "TEST_FILTER_CYPRESS=${TEST_FILTER_CYPRESS}" >> $GITHUB_OUTPUT
|
|
echo "TM4J_ENABLE=${TM4J_ENABLE:-}" >> $GITHUB_OUTPUT
|
|
echo "REPORT_TYPE=${COMPUTED_REPORT_TYPE}" >> $GITHUB_OUTPUT
|
|
echo "ROLLING_RELEASE_commit_sha=${ROLLING_RELEASE_COMMIT_SHA}" >> $GITHUB_OUTPUT
|
|
echo "ROLLING_RELEASE_SERVER_IMAGE=${ROLLING_RELEASE_SERVER_IMAGE}" >> $GITHUB_OUTPUT
|
|
echo "BUILD_ID=${BUILD_ID}" >> $GITHUB_OUTPUT
|
|
# User notification variables
|
|
echo "WORKFLOW_RUN_URL=${{ github.server_url }}/${{ github.repository }}/actions/runs/${{github.run_id}}" >> $GITHUB_OUTPUT
|
|
echo "CYCLE_URL=${AUTOMATION_DASHBOARD_URL%%/api}/cycle/${BUILD_ID}" >> $GITHUB_OUTPUT
|
|
- name: ci/notify-user
|
|
env:
|
|
COMMIT_SHA: "${{steps.generate.outputs.commit_sha}}"
|
|
STATUS_CHECK_CONTEXT: "${{steps.generate.outputs.status_check_context}}"
|
|
WORKFLOW_RUN_URL: "${{steps.generate.outputs.WORKFLOW_RUN_URL}}"
|
|
CYCLE_URL: "${{steps.generate.outputs.CYCLE_URL}}"
|
|
RUN_CYPRESS: "${{inputs.RUN_CYPRESS || ''}}"
|
|
RUN_PLAYWRIGHT: "${{inputs.RUN_PLAYWRIGHT || ''}}"
|
|
run: |
|
|
if [ -n "$PR_NUMBER" ]; then
|
|
gh issue -R "${{ github.repository }}" comment "$PR_NUMBER" --body-file - <<EOF
|
|
E2E test run is starting for commit \`${COMMIT_SHA}\`${MM_ENV:+, with \`MM_ENV=$MM_ENV\`}${MM_SERVICE_OVERRIDES:+, Cypress service overrides \`$MM_SERVICE_OVERRIDES\`}.
|
|
To check the run progress:
|
|
- Cypress: ${RUN_CYPRESS:+look for commit status \`$STATUS_CHECK_CONTEXT\` or the access the [Automation Dashboard Cycle URL]($CYCLE_URL)}$([ -n "${RUN_CYPRESS:-}" ] || echo -n "will not run").
|
|
- Playwright: ${RUN_PLAYWRIGHT:+look for commit status \`$STATUS_CHECK_CONTEXT-playwright\`}$([ -n "${RUN_PLAYWRIGHT:-}" ] || echo -n "will not run").
|
|
|
|
You can also look at the [E2E test's Workflow Run URL]($WORKFLOW_RUN_URL) (run ID \`${{ github.run_id }}\`).
|
|
EOF
|
|
fi
|
|
|
|
e2e-fulltest-cypress:
|
|
needs:
|
|
- generate-test-variables
|
|
uses: ./.github/workflows/e2e-tests-ci-template.yml
|
|
if: ${{ inputs.RUN_CYPRESS }}
|
|
with:
|
|
commit_sha: "${{ needs.generate-test-variables.outputs.commit_sha }}"
|
|
status_check_context: "${{ needs.generate-test-variables.outputs.status_check_context }}"
|
|
workers_number: "${{ needs.generate-test-variables.outputs.workers_number }}"
|
|
testcase_failure_fatal: false
|
|
run_preflight_checks: false
|
|
enable_reporting: true
|
|
SERVER: "${{ needs.generate-test-variables.outputs.SERVER }}"
|
|
SERVER_IMAGE: "${{ needs.generate-test-variables.outputs.SERVER_IMAGE }}"
|
|
ENABLED_DOCKER_SERVICES: "${{ needs.generate-test-variables.outputs.ENABLED_DOCKER_SERVICES }}"
|
|
TEST_FILTER: "${{ needs.generate-test-variables.outputs.TEST_FILTER_CYPRESS }}"
|
|
MM_ENV: "${{ inputs.MM_ENV || '' }}"
|
|
BRANCH: "${{ needs.generate-test-variables.outputs.BRANCH }}"
|
|
BUILD_ID: "${{ needs.generate-test-variables.outputs.BUILD_ID }}"
|
|
REPORT_TYPE: "${{ needs.generate-test-variables.outputs.REPORT_TYPE }}"
|
|
ROLLING_RELEASE_commit_sha: "${{ needs.generate-test-variables.outputs.ROLLING_RELEASE_commit_sha }}"
|
|
ROLLING_RELEASE_SERVER_IMAGE: "${{ needs.generate-test-variables.outputs.ROLLING_RELEASE_SERVER_IMAGE }}"
|
|
secrets:
|
|
MM_LICENSE: "${{ secrets[format('MM_E2E_TEST_LICENSE_{0}_ENT', needs.generate-test-variables.outputs.server_uppercase)] }}"
|
|
AUTOMATION_DASHBOARD_URL: "${{ secrets.MM_E2E_AUTOMATION_DASHBOARD_URL }}"
|
|
AUTOMATION_DASHBOARD_TOKEN: "${{ secrets.MM_E2E_AUTOMATION_DASHBOARD_TOKEN }}"
|
|
PUSH_NOTIFICATION_SERVER: "${{ secrets.MM_E2E_PUSH_NOTIFICATION_SERVER }}"
|
|
REPORT_WEBHOOK_URL: "${{ secrets.MM_E2E_REPORT_WEBHOOK_URL }}"
|
|
REPORT_TM4J_API_KEY: "${{ needs.generate-test-variables.outputs.TM4J_ENABLE == 'true' && secrets.MM_E2E_TM4J_API_KEY || '' }}"
|
|
REPORT_TM4J_TEST_CYCLE_LINK_PREFIX: "${{ secrets.MM_E2E_TEST_CYCLE_LINK_PREFIX }}"
|
|
CWS_URL: "${{ needs.generate-test-variables.outputs.SERVER == 'cloud' && secrets.MM_E2E_CWS_URL || '' }}"
|
|
CWS_EXTRA_HTTP_HEADERS: "${{ needs.generate-test-variables.outputs.SERVER == 'cloud' && secrets.MM_E2E_CWS_EXTRA_HTTP_HEADERS || '' }}"
|
|
|
|
e2e-fulltest-playwright:
|
|
needs:
|
|
- generate-test-variables
|
|
uses: ./.github/workflows/e2e-tests-ci-template.yml
|
|
if: ${{ inputs.RUN_PLAYWRIGHT }}
|
|
with:
|
|
commit_sha: "${{ needs.generate-test-variables.outputs.commit_sha }}"
|
|
status_check_context: "${{ needs.generate-test-variables.outputs.status_check_context }}-playwright"
|
|
workers_number: "1"
|
|
testcase_failure_fatal: false # NB: do not enable until Playwright test stability is reached
|
|
run_preflight_checks: false
|
|
enable_reporting: true
|
|
SERVER: "${{ needs.generate-test-variables.outputs.SERVER }}"
|
|
SERVER_IMAGE: "${{ needs.generate-test-variables.outputs.SERVER_IMAGE }}"
|
|
TEST: playwright
|
|
TEST_FILTER: "${{ needs.generate-test-variables.outputs.TEST_FILTER_PLAYWRIGHT }}"
|
|
MM_ENV: "${{ inputs.MM_ENV || '' }}"
|
|
BRANCH: "${{ needs.generate-test-variables.outputs.BRANCH }}"
|
|
BUILD_ID: "${{ needs.generate-test-variables.outputs.BUILD_ID }}"
|
|
REPORT_TYPE: "${{ needs.generate-test-variables.outputs.REPORT_TYPE }}"
|
|
ROLLING_RELEASE_commit_sha: "${{ needs.generate-test-variables.outputs.ROLLING_RELEASE_commit_sha }}"
|
|
ROLLING_RELEASE_SERVER_IMAGE: "${{ needs.generate-test-variables.outputs.ROLLING_RELEASE_SERVER_IMAGE }}"
|
|
secrets:
|
|
MM_LICENSE: "${{ secrets[format('MM_E2E_TEST_LICENSE_{0}_ENT', needs.generate-test-variables.outputs.server_uppercase)] }}"
|
|
PUSH_NOTIFICATION_SERVER: "${{ secrets.MM_E2E_PUSH_NOTIFICATION_SERVER }}"
|
|
REPORT_WEBHOOK_URL: "${{ secrets.MM_E2E_REPORT_WEBHOOK_URL }}"
|
|
CWS_URL: "${{ needs.generate-test-variables.outputs.SERVER == 'cloud' && secrets.MM_E2E_CWS_URL || '' }}"
|
|
CWS_EXTRA_HTTP_HEADERS: "${{ needs.generate-test-variables.outputs.SERVER == 'cloud' && secrets.MM_E2E_CWS_EXTRA_HTTP_HEADERS || '' }}"
|
|
|
|
notify-user:
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
needs:
|
|
- generate-test-variables
|
|
- e2e-fulltest-cypress
|
|
- e2e-fulltest-playwright
|
|
permissions:
|
|
issues: write
|
|
pull-requests: write
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
env:
|
|
GH_TOKEN: "${{ github.token }}"
|
|
PR_NUMBER: "${{ inputs.PR_NUMBER || '' }}"
|
|
MM_ENV: "${{ inputs.MM_ENV || '' }}"
|
|
COMMIT_SHA: "${{ needs.generate-test-variables.outputs.commit_sha }}"
|
|
STATUS_CHECK_CONTEXT: "${{ needs.generate-test-variables.outputs.status_check_context }}"
|
|
WORKFLOW_RUN_URL: "${{ needs.generate-test-variables.outputs.WORKFLOW_RUN_URL }}"
|
|
CYCLE_URL: "${{ needs.generate-test-variables.outputs.CYCLE_URL }}"
|
|
RUN_CYPRESS: "${{inputs.RUN_CYPRESS || ''}}"
|
|
RUN_PLAYWRIGHT: "${{inputs.RUN_PLAYWRIGHT || ''}}"
|
|
steps:
|
|
- name: ci/notify-user-test-completion
|
|
run: |
|
|
if [ -n "$PR_NUMBER" ]; then
|
|
gh issue -R "${{ github.repository }}" comment "$PR_NUMBER" --body-file - <<EOF
|
|
E2E test has completed for commit \`${COMMIT_SHA}\`${MM_ENV:+, with \`MM_ENV=$MM_ENV\`}.
|
|
Results summary:
|
|
- Cypress: ${RUN_CYPRESS:+pass rate is \`${{ needs.e2e-fulltest-cypress.outputs.pass_rate || 'unknown' }}\` (see [Automation Dashboard]($CYCLE_URL) and commit status check \`$STATUS_CHECK_CONTEXT\`)}$([ -n "${RUN_CYPRESS:-}" ] || echo -n "did not run").
|
|
- Playwright: ${RUN_PLAYWRIGHT:+pass rate is \`${{ needs.e2e-fulltest-playwright.outputs.pass_rate || 'unknown' }}\` (see commit status check \`$STATUS_CHECK_CONTEXT-playwright\`)}$([ -n "${RUN_PLAYWRIGHT:-}" ] || echo -n "did not run").
|
|
|
|
The run summary artifacts are available in the corresponding [Workflow Run]($WORKFLOW_RUN_URL).
|
|
EOF
|
|
fi
|