Skip to content

Commit ead9094

Browse files
bsgrigorovcursoragentalucardzom
authored
ci(INFRA-3629): Phase 5c Namespace artifact adoption (#30169)
## **Description** **Paired artifact steps:** `runner_provider=namespace` → SHA-pinned `namespace-actions/upload-artifact` / `namespace-actions/download-artifact`. Otherwise → `actions/upload-artifact@v4` / `actions/download-artifact@v4`. No dynamic `uses:`; only `if:`-gated pairs. **Behavior added** - **Coverage / Sonar:** Shards, merge outputs, and `lcov.info` use the same backend as the runner. - **iOS JS bundle:** Upload and downstream consumer use the same backend. - **E2E (`run-e2e-workflow.yml`):** JUnit, screenshots, and prior-run junit re-fetch use the paired backend on Namespace. - **Fixture validation:** Report job downloads junit with the same backend the producer used. - **Native E2E builds:** APK / androidTest and `.app` / sourcemap uploads align with same-run “download all” in `run-e2e-workflow.yml` (no mixed backend in one run). - **Smoke / regression:** Pattern shard downloads and rollup + JSON report uploads are paired on Namespace vs current. Regression rollups use explicit **`retention-days: 7`** on both backends (matches smoke; Namespace default without that is 30 days). **Caveats** - Cross-run APK/app reuse via `run-id` still uses GitHub’s API where used. **`find-reusable-build` is off on Namespace (Android + iOS)** until that path is validated for Namespace artifacts. - Org allowlist: TechOps asked to allow the two **`namespace-actions/*`** pins (distinct from **`namespacelabs/*`**). **Acceptance evidence (still to attach before closing INFRA-3629)** Implements pairing + pins only; ticket “done” still needs linked proof (Namespace `ci` dispatch where Namespace steps actually run, allowlist, INFRA-3597 pointer if applicable, native E2E Namespace handoff, timing/stability if required, rollback note on ticket). - Namespace manual dispatch: [25843127496](https://github.com/MetaMask/metamask-mobile/actions/runs/25843127496) (`runner_provider=namespace` — see run for status). - Recent **completed** `ci` on `phase5c/namespace-artifact-adoption`: | Kind | Run | Outcome | |------|-----|---------| | `workflow_dispatch` (Namespace runners) | [25839065840](https://github.com/MetaMask/metamask-mobile/actions/runs/25839065840) | failure | | `pull_request` (GitHub-hosted jobs) | [25839502117](https://github.com/MetaMask/metamask-mobile/actions/runs/25839502117) | success | | `pull_request` | [25839064157](https://github.com/MetaMask/metamask-mobile/actions/runs/25839064157) | cancelled | ## **Changelog** CHANGELOG entry: null ## **Related issues** Related to [INFRA-3629](https://consensyssoftware.atlassian.net/browse/INFRA-3629) — **partial implementation** until acceptance evidence is on the ticket (this PR does not claim full closure). ## **Manual testing steps** ```gherkin Feature: Namespace CI artifact parity Scenario: Manual CI trial on Namespace runners Given branch phase5c/namespace-artifact-adoption is pushed and a draft PR is open When a maintainer runs workflow "ci" via workflow_dispatch with runner_provider=namespace Then jobs that upload or download artifacts should use namespace-actions upload/download on Namespace runners And jobs on non-Namespace providers should use actions/upload-artifact and actions/download-artifact v4 Scenario: Optional comparison run Given the same ref and PR context When the same workflow is dispatched with runner_provider=current Then artifact steps should select GitHub artifact actions And no job should rely on Namespace-only storage for artifacts produced by the other provider in the same logical handoff ``` ## **Screenshots/Recordings** N/A — workflow and runner configuration only; validate via Actions run logs and the Artifacts tab on the workflow run. ### **Before** N/A ### **After** N/A ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### Performance checks (if applicable) - [ ] I've tested on Android - Ideally on a mid-range device; emulator is acceptable - [ ] I've tested with a power user scenario - Use these [power-user SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. [INFRA-3629]: https://consensyssoftware.atlassian.net/browse/INFRA-3629?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes CI artifact upload/download paths across builds, coverage, and E2E workflows; misconfiguration could break artifact handoffs and make tests/coverage flaky or unavailable on one runner provider. > > **Overview** > Standardizes artifact handling when `runner_provider=namespace` by **pairing** `namespace-actions/upload-artifact` + `namespace-actions/download-artifact` (SHA-pinned) with the existing `actions/*-artifact@v4` steps for non-Namespace runs, preventing mixed backends within a single workflow run. > > This updates Android/iOS E2E build workflows to upload APKs, test APKs, `.app` bundles, and iOS sourcemaps via the matching backend and adjusts job outputs/status logging accordingly; it also disables cross-run reusable-build lookup on Namespace for iOS. > > The main `ci.yml` workflow now uploads/downloads artifacts (iOS JS bundle, coverage shards/merged outputs, and fixture-validation JUnit) via the provider-matched backend, tweaks Namespace Jest parallelism (`--maxWorkers=33%`), and updates smoke/regression report workflows plus `run-e2e-workflow.yml` to download prior-run results and upload JUnit/screenshots using the same backend (with consistent `retention-days: 7`). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4680278. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Ale Som <560018+alucardzom@users.noreply.github.com>
1 parent c99e886 commit ead9094

8 files changed

Lines changed: 331 additions & 51 deletions

.github/workflows/build-android-e2e.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
CACHE_GENERATION: v1 # Increment this to bust the cache (v1, v2, v3, etc.)
4646
YARN_ENABLE_GLOBAL_CACHE: 'true' # Enable Yarn global cache for faster installs
4747
outputs:
48-
apk-uploaded: ${{ steps.upload-apk.outcome == 'success' }}
48+
apk-uploaded: ${{ steps.upload-apk-namespace.outcome == 'success' || steps.upload-apk.outcome == 'success' }}
4949
apk-target-path: ${{ steps.determine-target-paths.outputs.apk-target-path }}
5050
test-apk-target-path: ${{ steps.determine-target-paths.outputs.test-apk-target-path }}
5151
artifact_name: ${{ steps.determine-target-paths.outputs.artifact_name }}
@@ -452,17 +452,39 @@ jobs:
452452
GOOGLE_SERVICES_B64_ANDROID: ${{ secrets.GOOGLE_SERVICES_B64_ANDROID }}
453453
MM_INFURA_PROJECT_ID: ${{ secrets.MM_INFURA_PROJECT_ID }}
454454

455-
- name: Upload Android APK
455+
- name: Upload Android APK (Namespace)
456+
id: upload-apk-namespace
457+
if: ${{ inputs.runner_provider == 'namespace' }}
458+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
459+
with:
460+
name: ${{ inputs.build_type }}-${{ inputs.metamask_environment }}-release.apk
461+
path: ${{ steps.determine-target-paths.outputs.apk-target-path }}/${{ steps.determine-target-paths.outputs.artifact_name }}.apk
462+
retention-days: 7
463+
if-no-files-found: error
464+
465+
- name: Upload Android APK (current)
456466
id: upload-apk
467+
if: ${{ inputs.runner_provider != 'namespace' }}
457468
uses: actions/upload-artifact@v4
458469
with:
459470
name: ${{ inputs.build_type }}-${{ inputs.metamask_environment }}-release.apk
460471
path: ${{ steps.determine-target-paths.outputs.apk-target-path }}/${{ steps.determine-target-paths.outputs.artifact_name }}.apk
461472
retention-days: 7
462473
if-no-files-found: error
463474

464-
- name: Upload Android Test APK
475+
- name: Upload Android Test APK (Namespace)
476+
id: upload-test-apk-namespace
477+
if: ${{ inputs.runner_provider == 'namespace' }}
478+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
479+
with:
480+
name: ${{ inputs.build_type }}-${{ inputs.metamask_environment }}-release-androidTest.apk
481+
path: ${{ steps.determine-target-paths.outputs.test-apk-target-path }}/${{ steps.determine-target-paths.outputs.artifact_name }}-androidTest.apk
482+
retention-days: 7
483+
if-no-files-found: error
484+
485+
- name: Upload Android Test APK (current)
465486
id: upload-test-apk
487+
if: ${{ inputs.runner_provider != 'namespace' }}
466488
uses: actions/upload-artifact@v4
467489
with:
468490
name: ${{ inputs.build_type }}-${{ inputs.metamask_environment }}-release-androidTest.apk

.github/workflows/build-ios-e2e.yml

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ jobs:
3838
runs-on: ${{ inputs.runner_provider == 'namespace' && 'namespace-profile-metamask-ios-build' || (startsWith(github.base_ref, 'release/') && fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe-xl"]') || fromJSON('["ghcr.io/cirruslabs/macos-runner:tahoe-xl", "low-priority"]')) }}
3939
outputs:
4040
artifacts-url: ${{ steps.set-artifacts-url.outputs.artifacts-url }}
41-
app-uploaded: ${{ steps.upload-app.outcome == 'success' }}
42-
sourcemap-uploaded: ${{ steps.upload-sourcemap.outcome == 'success' }}
41+
app-uploaded: ${{ steps.upload-app-namespace.outcome == 'success' || steps.upload-app.outcome == 'success' }}
42+
sourcemap-uploaded: ${{ steps.upload-sourcemap-namespace.outcome == 'success' || steps.upload-sourcemap.outcome == 'success' }}
4343
env:
4444
XCODE_CACHE_VERSION: 1
4545
RCT_NO_LAUNCH_PACKAGER: 1
@@ -112,7 +112,8 @@ jobs:
112112

113113
- name: Find reusable build from prior run
114114
id: find-reusable-build
115-
if: ${{ steps.force-builds.outputs.force != 'true' && inputs.source-fingerprint != '' }}
115+
# Match Android: skip cross-run GitHub artifact reuse on Namespace until backend parity is proven.
116+
if: ${{ inputs.runner_provider != 'namespace' && steps.force-builds.outputs.force != 'true' && inputs.source-fingerprint != '' }}
116117
uses: ./.github/actions/find-reusable-build
117118
with:
118119
fingerprint: ${{ inputs.source-fingerprint }}
@@ -385,8 +386,20 @@ jobs:
385386
shell: bash
386387

387388
# Upload the iOS .app file that works in simulators
388-
- name: Upload iOS APP Artifact (Simulator)
389+
- name: Upload iOS APP Artifact (Simulator) (Namespace)
390+
id: upload-app-namespace
391+
if: ${{ inputs.runner_provider == 'namespace' }}
392+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
393+
with:
394+
name: ${{ inputs.build_type }}-${{ inputs.metamask_environment }}-MetaMask.app
395+
path: ios/build/Build/Products/Release-iphonesimulator/MetaMask.app
396+
retention-days: 7
397+
if-no-files-found: error
398+
continue-on-error: true
399+
400+
- name: Upload iOS APP Artifact (Simulator) (current)
389401
id: upload-app
402+
if: ${{ inputs.runner_provider != 'namespace' }}
390403
uses: actions/upload-artifact@v4
391404
with:
392405
name: ${{ inputs.build_type }}-${{ inputs.metamask_environment }}-MetaMask.app
@@ -399,8 +412,20 @@ jobs:
399412
# Both paths produce it: `yarn build:ios:main:e2e` via
400413
# `scripts/ios/bundle-js-and-sentry-upload.sh` and `yarn build:repack:ios`
401414
# via `scripts/repack.js` both write to `sourcemaps/ios/index.js.map`.
402-
- name: Upload iOS Source Map
415+
- name: Upload iOS Source Map (Namespace)
416+
id: upload-sourcemap-namespace
417+
if: ${{ inputs.runner_provider == 'namespace' }}
418+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
419+
with:
420+
name: ${{ inputs.build_type }}-${{ inputs.metamask_environment }}-index.js.map
421+
path: sourcemaps/ios/index.js.map
422+
retention-days: 7
423+
if-no-files-found: error
424+
continue-on-error: true
425+
426+
- name: Upload iOS Source Map (current)
403427
id: upload-sourcemap
428+
if: ${{ inputs.runner_provider != 'namespace' }}
404429
uses: actions/upload-artifact@v4
405430
with:
406431
name: ${{ inputs.build_type }}-${{ inputs.metamask_environment }}-index.js.map
@@ -418,8 +443,8 @@ jobs:
418443
echo "📦 Artifacts available at: ${ARTIFACTS_URL}"
419444
echo ""
420445
echo "Upload Status Summary:"
421-
echo "- APP (Simulator): ${{ steps.upload-app.outcome }}"
422-
echo "- Source Map: ${{ steps.upload-sourcemap.outcome }}"
446+
echo "- APP (Simulator): namespace=${{ steps.upload-app-namespace.outcome }} current=${{ steps.upload-app.outcome }}"
447+
echo "- Source Map: namespace=${{ steps.upload-sourcemap-namespace.outcome }} current=${{ steps.upload-sourcemap.outcome }}"
423448
424449
env:
425450
GITHUB_REPOSITORY: '${{ github.repository }}'

.github/workflows/ci.yml

Lines changed: 134 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,15 @@ jobs:
490490
"https://api.github.com/repos/${GITHUB_REPOSITORY}/statuses/${COMMIT_SHA}" \
491491
-d "$BODY"
492492
493-
- name: Upload iOS bundle
493+
- name: Upload iOS bundle (Namespace)
494+
if: ${{ inputs.runner_provider == 'namespace' }}
495+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
496+
with:
497+
name: ios-bundle
498+
path: ios/main.jsbundle
499+
retention-days: 7
500+
- name: Upload iOS bundle (current)
501+
if: ${{ inputs.runner_provider != 'namespace' }}
494502
uses: actions/upload-artifact@v4
495503
with:
496504
name: ios-bundle
@@ -508,7 +516,14 @@ jobs:
508516
- uses: actions/checkout@v6
509517
if: ${{ inputs.runner_provider != 'namespace' }}
510518

511-
- name: Download iOS bundle
519+
- name: Download iOS bundle (Namespace)
520+
if: ${{ inputs.runner_provider == 'namespace' }}
521+
uses: namespace-actions/download-artifact@7cbad919e4b0e09f17e9d6311a444ff002992b5b # v2.0.1
522+
with:
523+
name: ios-bundle
524+
path: ios
525+
- name: Download iOS bundle (current)
526+
if: ${{ inputs.runner_provider != 'namespace' }}
512527
uses: actions/download-artifact@v4
513528
with:
514529
name: ios-bundle
@@ -597,8 +612,8 @@ jobs:
597612
run: mkdir -p tests/results
598613
# The "10" in this command is the total number of shards. It must be kept
599614
# in sync with the length of matrix.shard
600-
# Namespace Linux: cap Jest workers to reduce cgroup OOM SIGKILL without tuning heap.
601-
- run: yarn test:unit --shard=${{ matrix.shard }}/10${{ inputs.runner_provider == 'namespace' && ' --maxWorkers=50%' || '' }} --forceExit --silent --coverageReporters=json --json --outputFile=tests/results/unit-test-results-${{ matrix.shard }}.json
615+
# Namespace Linux: --maxWorkers=33% (~3 workers on 8 vCPU) + 12GiB heap; GitHub-hosted keeps 20480.
616+
- run: yarn test:unit --shard=${{ matrix.shard }}/10${{ inputs.runner_provider == 'namespace' && ' --maxWorkers=33%' || '' }} --forceExit --silent --coverageReporters=json --json --outputFile=tests/results/unit-test-results-${{ matrix.shard }}.json
602617
env:
603618
NODE_OPTIONS: ${{ inputs.runner_provider == 'namespace' && '--max_old_space_size=12288' || '--max_old_space_size=20480' }}
604619
- name: Rename coverage report and extract test count for this shard
@@ -608,7 +623,17 @@ jobs:
608623
cp tests/results/unit-test-results-${{ matrix.shard }}.json ./tests/coverage/jest-results.json
609624
count=$(jq '(.numPassedTests // 0) + (.numFailedTests // 0)' tests/results/unit-test-results-${{ matrix.shard }}.json)
610625
echo "{\"count\": $count}" > ./tests/coverage/count.json
611-
- uses: actions/upload-artifact@v4
626+
- name: Upload coverage unit shard (Namespace)
627+
if: ${{ inputs.runner_provider == 'namespace' }}
628+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
629+
with:
630+
name: coverage-unit-${{ matrix.shard }}
631+
path: ./tests/coverage/
632+
if-no-files-found: error
633+
retention-days: 7
634+
- name: Upload coverage unit shard (current)
635+
if: ${{ inputs.runner_provider != 'namespace' }}
636+
uses: actions/upload-artifact@v4
612637
with:
613638
name: coverage-unit-${{ matrix.shard }}
614639
path: ./tests/coverage/
@@ -667,7 +692,15 @@ jobs:
667692
command: yarn install --immutable
668693
- name: Clean state and following up dependencies installation
669694
run: yarn setup:github-ci --node
670-
- uses: actions/download-artifact@v4
695+
- name: Download coverage shards (Namespace)
696+
if: ${{ inputs.runner_provider == 'namespace' }}
697+
uses: namespace-actions/download-artifact@7cbad919e4b0e09f17e9d6311a444ff002992b5b # v2.0.1
698+
with:
699+
pattern: coverage-*
700+
path: tests/coverage/
701+
- name: Download coverage shards (current)
702+
if: ${{ inputs.runner_provider != 'namespace' }}
703+
uses: actions/download-artifact@v4
671704
with:
672705
pattern: coverage-*
673706
path: tests/coverage/
@@ -705,41 +738,101 @@ jobs:
705738
find ./tests/coverage/coverage-* -name 'coverage-*.json' -exec mv {} ./tests/coverage/ \;
706739
- run: yarn test:merge-coverage
707740
- run: yarn test:validate-coverage
708-
- uses: actions/upload-artifact@v4
741+
- name: Upload lcov.info (Namespace)
742+
if: ${{ inputs.runner_provider == 'namespace' }}
743+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
744+
with:
745+
name: lcov.info
746+
path: ./tests/merged-coverage/lcov.info
747+
if-no-files-found: error
748+
retention-days: 7
749+
- name: Upload lcov.info (current)
750+
if: ${{ inputs.runner_provider != 'namespace' }}
751+
uses: actions/upload-artifact@v4
709752
with:
710753
name: lcov.info
711754
path: ./tests/merged-coverage/lcov.info
712755
if-no-files-found: error
713756
retention-days: 7
714-
- uses: actions/upload-artifact@v4
757+
- name: Upload cv-test-stats (Namespace)
758+
if: ${{ inputs.runner_provider == 'namespace' }}
759+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
715760
with:
716761
name: cv-test-stats
717762
path: ./cv-test-stats.json
718763
if-no-files-found: error
719764
retention-days: 7
720-
- uses: actions/upload-artifact@v4
765+
- name: Upload cv-test-stats (current)
766+
if: ${{ inputs.runner_provider != 'namespace' }}
767+
uses: actions/upload-artifact@v4
768+
with:
769+
name: cv-test-stats
770+
path: ./cv-test-stats.json
771+
if-no-files-found: error
772+
retention-days: 7
773+
- name: Upload unit-test-stats (Namespace)
774+
if: ${{ inputs.runner_provider == 'namespace' }}
775+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
776+
with:
777+
name: unit-test-stats
778+
path: ./unit-test-stats.json
779+
if-no-files-found: error
780+
retention-days: 7
781+
- name: Upload unit-test-stats (current)
782+
if: ${{ inputs.runner_provider != 'namespace' }}
783+
uses: actions/upload-artifact@v4
721784
with:
722785
name: unit-test-stats
723786
path: ./unit-test-stats.json
724787
if-no-files-found: error
725788
retention-days: 7
726789
- name: Generate CV test coverage report
727790
run: yarn nyc report --temp-dir ./tests/coverage-cv-merged --report-dir ./tests/coverage-cv-lcov --reporter html --reporter json-summary
728-
- uses: actions/upload-artifact@v4
791+
- name: Upload cv-test-coverage-html (Namespace)
792+
if: ${{ inputs.runner_provider == 'namespace' }}
793+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
794+
with:
795+
name: cv-test-coverage-html
796+
path: ./tests/coverage-cv-lcov/
797+
if-no-files-found: error
798+
retention-days: 7
799+
- name: Upload cv-test-coverage-html (current)
800+
if: ${{ inputs.runner_provider != 'namespace' }}
801+
uses: actions/upload-artifact@v4
729802
with:
730803
name: cv-test-coverage-html
731804
path: ./tests/coverage-cv-lcov/
732805
if-no-files-found: error
733806
retention-days: 7
734-
- uses: actions/upload-artifact@v4
807+
- name: Upload cv-test-coverage-summary (Namespace)
808+
if: ${{ inputs.runner_provider == 'namespace' }}
809+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
810+
with:
811+
name: cv-test-coverage-summary
812+
path: ./tests/coverage-cv-lcov/coverage-summary.json
813+
if-no-files-found: error
814+
retention-days: 7
815+
- name: Upload cv-test-coverage-summary (current)
816+
if: ${{ inputs.runner_provider != 'namespace' }}
817+
uses: actions/upload-artifact@v4
735818
with:
736819
name: cv-test-coverage-summary
737820
path: ./tests/coverage-cv-lcov/coverage-summary.json
738821
if-no-files-found: error
739822
retention-days: 7
740823
- name: Generate unit test coverage summary
741824
run: yarn nyc report --temp-dir ./tests/coverage-unit-merged --report-dir ./tests/coverage-unit-lcov --reporter json-summary
742-
- uses: actions/upload-artifact@v4
825+
- name: Upload unit-test-coverage-summary (Namespace)
826+
if: ${{ inputs.runner_provider == 'namespace' }}
827+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
828+
with:
829+
name: unit-test-coverage-summary
830+
path: ./tests/coverage-unit-lcov/coverage-summary.json
831+
if-no-files-found: error
832+
retention-days: 7
833+
- name: Upload unit-test-coverage-summary (current)
834+
if: ${{ inputs.runner_provider != 'namespace' }}
835+
uses: actions/upload-artifact@v4
743836
with:
744837
name: unit-test-coverage-summary
745838
path: ./tests/coverage-unit-lcov/coverage-summary.json
@@ -817,7 +910,17 @@ jobs:
817910
cp tests/results/cv-test-results-${{ matrix.shard }}.json ./tests/coverage/jest-results.json
818911
count=$(jq '(.numPassedTests // 0) + (.numFailedTests // 0)' tests/results/cv-test-results-${{ matrix.shard }}.json)
819912
echo "{\"count\": $count}" > ./tests/coverage/count.json
820-
- uses: actions/upload-artifact@v4
913+
- name: Upload coverage CV shard (Namespace)
914+
if: ${{ inputs.runner_provider == 'namespace' }}
915+
uses: namespace-actions/upload-artifact@f6ccaacc655aec41b93af180d1d7eef21af862d2 # v1.0.3
916+
with:
917+
name: coverage-cv-${{ matrix.shard }}
918+
path: ./tests/coverage/
919+
if-no-files-found: error
920+
retention-days: 7
921+
- name: Upload coverage CV shard (current)
922+
if: ${{ inputs.runner_provider != 'namespace' }}
923+
uses: actions/upload-artifact@v4
821924
with:
822925
name: coverage-cv-${{ matrix.shard }}
823926
path: ./tests/coverage/
@@ -990,7 +1093,15 @@ jobs:
9901093
- uses: actions/checkout@v6
9911094
if: ${{ inputs.runner_provider != 'namespace' }}
9921095

993-
- name: Download fixture validation results
1096+
- name: Download fixture validation results (Namespace)
1097+
if: ${{ inputs.runner_provider == 'namespace' }}
1098+
continue-on-error: true
1099+
uses: namespace-actions/download-artifact@7cbad919e4b0e09f17e9d6311a444ff002992b5b # v2.0.1
1100+
with:
1101+
name: test-e2e-main-validate-e2e-fixtures-junit-results
1102+
path: fixture-results/
1103+
- name: Download fixture validation results (current)
1104+
if: ${{ inputs.runner_provider != 'namespace' }}
9941105
continue-on-error: true
9951106
uses: actions/download-artifact@v4
9961107
with:
@@ -1033,7 +1144,15 @@ jobs:
10331144
- uses: actions/setup-node@v6
10341145
with:
10351146
node-version-file: '.nvmrc'
1036-
- uses: actions/download-artifact@v4
1147+
- name: Download lcov.info (Namespace)
1148+
if: ${{ inputs.runner_provider == 'namespace' }}
1149+
uses: namespace-actions/download-artifact@7cbad919e4b0e09f17e9d6311a444ff002992b5b # v2.0.1
1150+
with:
1151+
name: lcov.info
1152+
path: coverage/
1153+
- name: Download lcov.info (current)
1154+
if: ${{ inputs.runner_provider != 'namespace' }}
1155+
uses: actions/download-artifact@v4
10371156
with:
10381157
name: lcov.info
10391158
path: coverage/

0 commit comments

Comments
 (0)