ci: post success to required e2e status contexts when no relevant changes (#35880) (#35901)
Some checks failed
Server CI / Compute Go Version (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Server CI / Check mocks (push) Has been cancelled
Server CI / Check go mod tidy (push) Has been cancelled
Server CI / check-style (push) Has been cancelled
Server CI / Check serialization methods for hot structs (push) Has been cancelled
Server CI / Vet API (push) Has been cancelled
Server CI / Check migration files (push) Has been cancelled
Server CI / Generate email templates (push) Has been cancelled
Server CI / Check store layers (push) Has been cancelled
Server CI / Check mmctl docs (push) Has been cancelled
Server CI / Postgres with binary parameters (push) Has been cancelled
Server CI / Postgres (push) Has been cancelled
Server CI / Postgres (FIPS) (push) Has been cancelled
Server CI / Generate Test Coverage (push) Has been cancelled
Server CI / Run mmctl tests (push) Has been cancelled
Server CI / Run mmctl tests (FIPS) (push) Has been cancelled
Server CI / Build mattermost server app (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / test (platform) (push) Has been cancelled
Web App CI / test (mattermost-redux) (push) Has been cancelled
Web App CI / test (channels shard 1/4) (push) Has been cancelled
Web App CI / test (channels shard 2/4) (push) Has been cancelled
Web App CI / test (channels shard 3/4) (push) Has been cancelled
Web App CI / test (channels shard 4/4) (push) Has been cancelled
Web App CI / upload-coverage (push) Has been cancelled
Web App CI / build (push) Has been cancelled

Automatic Merge
This commit is contained in:
Mattermost Build 2026-04-01 18:36:05 +02:00 committed by GitHub
parent 890b514bab
commit b963e08015
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 62 additions and 2 deletions

View file

@ -186,7 +186,9 @@ jobs:
needs:
- resolve-pr
- check-changes
if: needs.check-changes.outputs.should_run == 'true'
if: needs.resolve-pr.outputs.PR_NUMBER != ''
permissions:
statuses: write
uses: ./.github/workflows/e2e-tests-cypress.yml
with:
commit_sha: "${{ needs.resolve-pr.outputs.COMMIT_SHA }}"
@ -195,6 +197,7 @@ jobs:
enable_reporting: true
report_type: "PR"
pr_number: "${{ needs.resolve-pr.outputs.PR_NUMBER }}"
should_run: "${{ needs.check-changes.outputs.should_run }}"
secrets:
MM_LICENSE: "${{ secrets.MM_E2E_TEST_LICENSE_ONPREM_ENT }}"
AUTOMATION_DASHBOARD_URL: "${{ secrets.MM_E2E_AUTOMATION_DASHBOARD_URL }}"
@ -208,7 +211,9 @@ jobs:
needs:
- resolve-pr
- check-changes
if: needs.check-changes.outputs.should_run == 'true'
if: needs.resolve-pr.outputs.PR_NUMBER != ''
permissions:
statuses: write
uses: ./.github/workflows/e2e-tests-playwright.yml
with:
commit_sha: "${{ needs.resolve-pr.outputs.COMMIT_SHA }}"
@ -217,6 +222,7 @@ jobs:
enable_reporting: true
report_type: "PR"
pr_number: "${{ needs.resolve-pr.outputs.PR_NUMBER }}"
should_run: "${{ needs.check-changes.outputs.should_run }}"
secrets:
MM_LICENSE: "${{ secrets.MM_E2E_TEST_LICENSE_ONPREM_ENT }}"
AWS_ACCESS_KEY_ID: "${{ secrets.CYPRESS_AWS_ACCESS_KEY_ID }}"

View file

@ -41,6 +41,11 @@ on:
type: string
required: false
description: "Source branch name for webhook messages (e.g., 'master' or 'release-11.4')"
should_run:
type: string
required: false
default: "true"
description: "Set to 'false' to skip tests and post a success status without running E2E"
secrets:
MM_LICENSE:
required: false
@ -135,9 +140,31 @@ jobs:
*) echo "context_suffix=" >> $GITHUB_OUTPUT ;;
esac
skip:
needs:
- generate-build-variables
if: inputs.should_run == 'false'
runs-on: ubuntu-24.04
permissions:
statuses: write
steps:
- name: ci/post-skip-status
env:
GH_TOKEN: ${{ github.token }}
COMMIT_SHA: ${{ inputs.commit_sha }}
CONTEXT_NAME: "e2e-test/cypress-full/${{ inputs.server_edition || 'enterprise' }}${{ needs.generate-build-variables.outputs.context_suffix }}"
run: |
gh api repos/${{ github.repository }}/statuses/${COMMIT_SHA} \
-f state=success \
-f context="${CONTEXT_NAME}" \
-f description="No E2E-relevant changes - skipped" \
-f target_url="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
echo "Posted success for ${CONTEXT_NAME}"
cypress-full:
needs:
- generate-build-variables
if: inputs.should_run != 'false'
uses: ./.github/workflows/e2e-tests-cypress-template.yml
with:
test_type: full

View file

@ -41,6 +41,11 @@ on:
type: string
required: false
description: "Source branch name for webhook messages (e.g., 'master' or 'release-11.4')"
should_run:
type: string
required: false
default: "true"
description: "Set to 'false' to skip tests and post a success status without running E2E"
secrets:
MM_LICENSE:
required: false
@ -129,9 +134,31 @@ jobs:
*) echo "context_suffix=" >> $GITHUB_OUTPUT ;;
esac
skip:
needs:
- generate-build-variables
if: inputs.should_run == 'false'
runs-on: ubuntu-24.04
permissions:
statuses: write
steps:
- name: ci/post-skip-status
env:
GH_TOKEN: ${{ github.token }}
COMMIT_SHA: ${{ inputs.commit_sha }}
CONTEXT_NAME: "e2e-test/playwright-full/${{ inputs.server_edition || 'enterprise' }}${{ needs.generate-build-variables.outputs.context_suffix }}"
run: |
gh api repos/${{ github.repository }}/statuses/${COMMIT_SHA} \
-f state=success \
-f context="${CONTEXT_NAME}" \
-f description="No E2E-relevant changes - skipped" \
-f target_url="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
echo "Posted success for ${CONTEXT_NAME}"
playwright-full:
needs:
- generate-build-variables
if: inputs.should_run != 'false'
uses: ./.github/workflows/e2e-tests-playwright-template.yml
with:
test_type: full