mattermost-mobile-upstream/.github/workflows/ci.yml
yasser khan 6f8f87b081
fix: Product fixes to run e2e tests (#10081)
fix: extract product fixes from Detox PR and stabilize related E2E

Move Saved, thread follow, bookmarks image_url, tables, search persist,
create-channel retry, and sidebar padding onto their own branch so they
can land or revert independently of the E2E harness.

Also includes:
- iOS search clear/Cancel overlap and resting margin fixes
- Saved messages subscription distinctUntilChanged guards (no flicker)
- Table horizontal inset derived from a single padding constant
- Manual time entry commits on parse (not only blur/submit)
- Presence sheet dismiss-before-status-update (Android Fabric crash)
- Bounded keyboard dismiss on Android edge-to-edge only; iOS unbound
- Create-channel retry leaves header button enabled on failure
- E2E flakiness: Maestro attach_logs/subflows, bookmark Edit wait,
  status sheet timing, classification lock transport retries,
  apiCreatePost throws on network errors, flow-header contract in CI
- Unit/integration coverage and CodeRabbit follow-ups for the above
2026-08-26 16:12:37 +05:30

88 lines
2.9 KiB
YAML

name: ci
on:
push:
branches:
- main
- 'release*'
pull_request:
permissions:
pull-requests: write
env:
NODE_VERSION: 24.15.0
TERM: xterm
jobs:
lint-typecheck:
runs-on: ubuntu-22.04
steps:
- name: ci/checkout-repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: ci/prepare-node-deps
uses: ./.github/actions/prepare-node-deps
- name: ci/check-styles
shell: bash
run: |
echo "::group::check-styles"
npm run check
echo "::endgroup::"
- name: ci/check-i18n
shell: bash
run: |
echo "::group::check-i18n"
./scripts/precommit/i18n.sh
echo "::endgroup::"
detox-lint-typecheck:
# The detox/ package has its own tsconfig and is not covered by the root
# check above. A TypeScript error in a detox test file makes its whole suite
# fail to run, so the E2E shard exits non-zero and drops its JUnit, silently
# reducing the reported test count. Type-check detox on every PR so the error
# surfaces here instead.
runs-on: ubuntu-22.04
steps:
- name: ci/checkout-repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: ci/prepare-node-deps
uses: ./.github/actions/prepare-node-deps
- name: ci/detox-install
shell: bash
# prepare-node-deps only installs the top-level node_modules; the detox
# package has its own, needed for its type-check.
run: cd detox && npm ci
- name: ci/detox-typecheck
shell: bash
run: |
echo "::group::detox-typecheck"
cd detox && npm run tsc
echo "::endgroup::"
# Also validated by the E2E workflow, but that one is label-gated, so a header
# contract break could sit unreported until someone asked for an E2E run. This
# job is unconditional and finishes in about a minute.
- name: ci/detox-validate-flow-headers
shell: bash
run: |
echo "::group::detox-validate-flow-headers"
bash detox/maestro/scripts/validate-flow-headers.sh
echo "::endgroup::"
test:
runs-on: ubuntu-22.04
steps:
- name: ci/checkout-repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: ci/prepare-node-deps
uses: ./.github/actions/prepare-node-deps
- name: ci/run-tests
# main and PRs run test:coverage via the test-coverage action below;
# release branches just need a plain test pass.
if: startsWith(github.ref_name, 'release')
shell: bash
run: npm run test:ci
- name: ci/test-coverage
if: github.event_name == 'pull_request' || github.ref_name == 'main'
uses: ./.github/actions/test-coverage
with:
run_id: ${{ github.run_id }}