mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
Workers no longer run `npm ci` — `node_modules` and framework binaries are restored from actions/cache populated once by a new `prep-deps` job. This closes the intermittent EEXIST/ENOENT failure inside npm's own cacache writer that occasionally fails `npm ci` on a runner. Removing `npm ci` from workers also cuts ~5 min of duplicated install work per worker. dispatch-begin now runs as its own job after prep-deps so it fires once the per-worker test-server setup is the only remaining work before dispatch-run.
78 lines
2.6 KiB
YAML
78 lines
2.6 KiB
YAML
---
|
|
name: E2E Tests Check
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "e2e-tests/**"
|
|
- "webapp/platform/client/**"
|
|
- "webapp/platform/types/**"
|
|
- ".github/workflows/e2e-*.yml"
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: ci/checkout-repo
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: ci/setup-node
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version-file: ".nvmrc"
|
|
cache: npm
|
|
cache-dependency-path: |
|
|
e2e-tests/cypress/package-lock.json
|
|
e2e-tests/playwright/package-lock.json
|
|
webapp/package-lock.json
|
|
- 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
|
|
|
|
# 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/get-webapp-node-modules
|
|
working-directory: webapp
|
|
run: make node_modules
|
|
- 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}"
|