mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-09 16:22:55 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 558802b552 | |||
| 7a37282d0b | |||
| 728ace6f81 |
@@ -11,6 +11,11 @@ permissions: {}
|
|||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
name: Tests
|
name: Tests
|
||||||
|
# HealthChat: skip in this fork. It runs nightly Mon-Fri and fails at checkout, because
|
||||||
|
# permissions: {} leaves a metadata-only token that cannot read an INTERNAL repo. Gated rather
|
||||||
|
# than deleted so the file keeps rebasing cleanly. Run locally with
|
||||||
|
# `swift run tools ci accessibility-tests`.
|
||||||
|
if: github.repository == 'element-hq/element-x-ios'
|
||||||
runs-on: macos-26
|
runs-on: macos-26
|
||||||
timeout-minutes: 150
|
timeout-minutes: 150
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ permissions: {}
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
|
# HealthChat: skip in this fork. It only triggers on changes under compound-ios/, which this fork
|
||||||
|
# has never edited, so it would only ever fire on an upstream sync and go red at checkout —
|
||||||
|
# permissions: {} leaves a metadata-only token that cannot read an INTERNAL repo. Gated rather
|
||||||
|
# than deleted so the file keeps rebasing cleanly.
|
||||||
|
if: github.repository == 'element-hq/element-x-ios'
|
||||||
runs-on: macos-26
|
runs-on: macos-26
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # HealthChat: this fork is INTERNAL, so a metadata-only token 404s on checkout. Upstream is public, hence permissions: {} there.
|
||||||
|
issues: read # HealthChat: Danger reads the PR via the issues API (a PR is an issue there); pull-requests alone 403s on GET /issues/{n}.
|
||||||
|
pull-requests: write # HealthChat: Danger posts its report comment and inline SwiftLint review comments (Dangerfile.swift:5 sets inline: true) with GITHUB_TOKEN.
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||||
group: ${{ format('danger-ci-{0}', github.ref) }}
|
group: ${{ format('danger-ci-{0}', github.ref) }}
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ permissions: {}
|
|||||||
jobs:
|
jobs:
|
||||||
integration_tests:
|
integration_tests:
|
||||||
name: Integration Tests
|
name: Integration Tests
|
||||||
|
# HealthChat: skip in this fork. It runs nightly Mon-Fri and fails at checkout, and it is the one
|
||||||
|
# job that still calls out to Element's Codecov — its upload guard is true on schedule events, so
|
||||||
|
# it POSTs slug/branch/SHA every night with continue-on-error hiding the failure. Fixing it would
|
||||||
|
# need a real healthchat.ch test account and three new secrets, and would still not work:
|
||||||
|
# HealthChatAppSettingsHook sets allowOtherAccountProviders: false, hiding the change-server UI
|
||||||
|
# these tests drive. Gated rather than deleted so the file keeps rebasing cleanly.
|
||||||
|
if: github.repository == 'element-hq/element-x-ios'
|
||||||
runs-on: macos-26
|
runs-on: macos-26
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,12 @@ permissions: {}
|
|||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
name: Tests
|
name: Tests
|
||||||
|
# HealthChat: skip in this fork. It runs nightly Mon-Fri and fails at checkout, because
|
||||||
|
# permissions: {} leaves a metadata-only token that cannot read an INTERNAL repo. Fixing the
|
||||||
|
# permission would not help: the rebrand changed the start screen without re-recording any
|
||||||
|
# UITests snapshot, so it would fail on content instead. Gated rather than deleted so the file
|
||||||
|
# keeps rebasing cleanly. Run locally with `swift run tools ci ui-tests`.
|
||||||
|
if: github.repository == 'element-hq/element-x-ios'
|
||||||
runs-on: macos-26
|
runs-on: macos-26
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -17,7 +17,14 @@ jobs:
|
|||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
|
|
||||||
# Skip in forks
|
# Skip in forks
|
||||||
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
# HealthChat: this job can never pass in this fork — it needs
|
||||||
|
# secrets.ELEMENT_BOT_TOKEN (Element's bot, absent here) and recursively
|
||||||
|
# checks out the private element-hq/element-ios-enterprise submodule, which
|
||||||
|
# Novaloop cannot obtain. The guard below only asks whether the PR comes
|
||||||
|
# FROM a fork, not whether this repo IS one, so it does not skip us. Gate on
|
||||||
|
# the upstream repo as post-release.yml does. Gated rather than deleted so
|
||||||
|
# the file keeps rebasing cleanly against upstream.
|
||||||
|
if: ${{ github.repository == 'element-hq/element-x-ios' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||||
|
|||||||
@@ -13,24 +13,71 @@ permissions: {}
|
|||||||
jobs:
|
jobs:
|
||||||
tests:
|
tests:
|
||||||
name: Tests
|
name: Tests
|
||||||
runs-on: macos-26
|
# HealthChat: GitHub-hosted macos-26 could not finish this job inside
|
||||||
|
# timeout-minutes: 60 (two attempts: 51m42s, then killed at 60m44s), and macOS
|
||||||
|
# minutes bill at 10x. novaloop-mac-studio-001 is the org's Mac Studio, already
|
||||||
|
# used by the release pipeline; its labels are [self-hosted, macOS, ARM64].
|
||||||
|
runs-on: [self-hosted, macOS]
|
||||||
|
# Upstream's 60 is kept: with previews skipped (see Run tests) the build plus unit tests measured
|
||||||
|
# ~16 min here. A run approaching this budget is a signal, not normal — the earlier 60m timeouts
|
||||||
|
# were preview tests, not the build.
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read # HealthChat: this fork is INTERNAL, so a metadata-only token 404s on checkout (and on git lfs pull). Upstream is public, hence permissions: {} there.
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
||||||
group: ${{ format('unit-tests-{0}', github.ref) }}
|
group: ${{ format('unit-tests-{0}', github.ref) }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
# HealthChat: upstream passes persist-credentials: false here, which the
|
||||||
|
# composite forwards to actions/checkout — stripping the auth header before
|
||||||
|
# its separate "Git LFS Pull" step runs. Upstream can afford that because
|
||||||
|
# its repo is public and git lfs pull works anonymously; this fork is
|
||||||
|
# INTERNAL, so the LFS batch endpoint would 404. Keep the composite's own
|
||||||
|
# default (true) so the pull is authenticated with GITHUB_TOKEN.
|
||||||
- uses: nschloe/action-cached-lfs-checkout@385a8ecc719e50b8c71af6ab01a624b486b7c3bc # v1.2.5
|
- uses: nschloe/action-cached-lfs-checkout@385a8ecc719e50b8c71af6ab01a624b486b7c3bc # v1.2.5
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: Setup environment
|
# HealthChat: verify only — never provision. Upstream's
|
||||||
run: source ci_scripts/ci_common.sh && setup_github_actions_environment
|
# setup_github_actions_environment cannot run on this runner: it calls
|
||||||
|
# `sudo xcode-select -s /Applications/Xcode_26.5.0.app`, but the runner has no
|
||||||
|
# passwordless sudo and no such path (only /Applications/Xcode.app exists), and
|
||||||
|
# it calls `brew update && brew install ...` — novaloop-mac-studio-001 is the
|
||||||
|
# shared release machine, so a per-run `brew update` could upgrade xcodegen
|
||||||
|
# underneath the release pipeline. These tools are installed once by hand; CI
|
||||||
|
# only asserts they are present and fails loudly, naming the fix, if not.
|
||||||
|
- name: Verify environment
|
||||||
|
run: |
|
||||||
|
set -eu
|
||||||
|
missing=""
|
||||||
|
formulae=""
|
||||||
|
for tool in xcodegen swiftlint swiftformat xcbeautify xcresultparser pkl git-lfs; do
|
||||||
|
if ! command -v "$tool" >/dev/null 2>&1; then
|
||||||
|
missing="$missing $tool"
|
||||||
|
case "$tool" in
|
||||||
|
# Not in homebrew-core; only this tap ships it.
|
||||||
|
xcresultparser) formulae="$formulae a7ex/homebrew-formulae/xcresultparser" ;;
|
||||||
|
*) formulae="$formulae $tool" ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -n "$missing" ]; then
|
||||||
|
echo "::error::Missing on self-hosted runner:${missing}. Install by hand on novaloop-mac-studio-001, then re-run: brew install${formulae}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
# The Xcode version is no longer pinned anywhere, so this is the only record
|
||||||
|
# of which Xcode built a given run.
|
||||||
|
xcodebuild -version
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: swift run -q tools ci unit-tests
|
# HealthChat: previews are skipped. PreviewTests renders a snapshot for every preview in the
|
||||||
|
# app and was the entire reason this job could not fit in an hour — it never once finished,
|
||||||
|
# on either runner. Unit tests alone take ~16 min here. Upstream skips them the same way in
|
||||||
|
# unit-tests-enterprise.yml. Cost: preview snapshot regressions are not caught in CI, so
|
||||||
|
# re-record and check them locally when changing UI.
|
||||||
|
run: swift run -q tools ci unit-tests --skip-previews
|
||||||
|
|
||||||
- name: Archive artifacts
|
- name: Archive artifacts
|
||||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
@@ -44,7 +91,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
# Skip if not successful and in forks
|
# Skip if not successful and in forks
|
||||||
if: ${{ success() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
# HealthChat: the existing guard only asks whether the PR comes FROM a
|
||||||
|
# fork, not whether this repo IS one, so it is true here and the step
|
||||||
|
# runs without a CODECOV_TOKEN — which fails the job via
|
||||||
|
# fail_ci_if_error. Gate on the upstream repo as post-release.yml does.
|
||||||
|
if: ${{ success() && github.repository == 'element-hq/element-x-ios' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||||
with:
|
with:
|
||||||
report_type: coverage
|
report_type: coverage
|
||||||
@@ -56,7 +107,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload test results to Codecov
|
- name: Upload test results to Codecov
|
||||||
# Skip if cancelled and in forks
|
# Skip if cancelled and in forks
|
||||||
if: ${{ !cancelled() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
# HealthChat: gated on the upstream repo for the same reason as the
|
||||||
|
# coverage step above — no CODECOV_TOKEN exists in this fork.
|
||||||
|
if: ${{ !cancelled() && github.repository == 'element-hq/element-x-ios' && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) }}
|
||||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
|
security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files.
|
||||||
|
contents: read # HealthChat: this fork is INTERNAL, so a metadata-only token 404s on checkout. Upstream is public, hence permissions: {} there.
|
||||||
|
actions: read # HealthChat: upload-sarif additionally needs this on private/internal repos; public upstream does not.
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|||||||
Reference in New Issue
Block a user