--- name: E2E Tests Check on: pull_request: paths: - "e2e-tests/**" - "webapp/platform/client/**" - "webapp/platform/eslint-plugin/**" - "webapp/platform/types/**" - ".github/workflows/e2e-*.yml" permissions: actions: write contents: read pull-requests: read jobs: check: runs-on: ubuntu-24.04 steps: - name: ci/checkout-repo uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false fetch-depth: 0 - name: ci/restore-npm-cache uses: ./.github/actions/restore-e2e-npm-cache - name: ci/setup-node uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 with: node-version-file: ".nvmrc" - name: ci/npm-cache-verify # Heal any partial/dangling entries left in the restored ~/.npm cache # before running `npm ci`. Avoids the intermittent EEXIST/ENOENT # failures in npm's cacache writer. run: npm cache verify # Set up web app subpackages and eslint plugin, restoring the warmed # node_modules cache read-only and falling back to `make node_modules` on a # miss. - name: ci/webapp-setup uses: ./.github/actions/webapp-setup with: read-only: "true" # Cypress check - name: ci/cypress/npm-install working-directory: e2e-tests/cypress run: npm ci - name: ci/cypress/npm-check working-directory: e2e-tests/cypress run: npm run check # Playwright check - name: ci/playwright/npm-install working-directory: e2e-tests/playwright run: npm ci - name: ci/playwright/npm-check working-directory: e2e-tests/playwright run: npm run check # Shell check - name: ci/shell-check working-directory: e2e-tests run: make check-shell # E2E-only check and trigger - name: ci/check-e2e-test-only id: check uses: ./.github/actions/check-e2e-test-only with: base_sha: ${{ github.event.pull_request.base.sha }} head_sha: ${{ github.event.pull_request.head.sha }} pr_number: ${{ github.event.pull_request.number }} - name: ci/trigger-e2e-with-branch-image if: >- steps.check.outputs.e2e_test_only == 'true' && (github.event.pull_request.base.ref == 'master' || startsWith(github.event.pull_request.base.ref, 'release-')) env: GH_TOKEN: ${{ github.token }} PR_NUMBER: ${{ github.event.pull_request.number }} IMAGE_TAG: ${{ steps.check.outputs.image_tag }} run: | echo "Triggering E2E tests for PR #${PR_NUMBER} with mattermostdevelopment/mattermost-enterprise-edition:${IMAGE_TAG}" gh workflow run e2e-tests-ci.yml --field pr_number="${PR_NUMBER}"