3 Commits
Author SHA1 Message Date
Nicola Corti 3e6b2bf8cc Retry artifact uploads in CI (#58620)
Summary:
Artifact uploads can fail on transient network errors such as the `ETIMEDOUT` in https://github.com/react/react-native/actions/runs/35598907154/job/106330670539.

This change:

- adds a local composite action backed by `actions/upload-artifact` v7.0.1
- retries failed uploads twice, waiting 10 seconds before attempt 2 and 20 seconds before attempt 3
- propagates the third failure to the caller
- preserves all v7 inputs and outputs
- migrates all 35 artifact upload call sites to the wrapper

## Changelog:

[INTERNAL] [FIXED] - Retry artifact uploads to reduce transient CI failures.

Pull Request resolved: https://github.com/react/react-native/pull/58620

Test Plan:
- `node_modules/.bin/prettier --check $(git diff --name-only HEAD^ -- '*.yml' '*.yaml')` — passed
- `npx --yes action-validator/cli@0.6.0 .github/actions/upload-artifact/action.yml` — passed
- `git diff HEAD^ --check` — passed
- Verified no `actions/upload-artifact@v6` references remain under `.github`

Reviewed By: andrewdacenko

Differential Revision: D121002745

Pulled By: cortinico

fbshipit-source-id: e63e30f3e86b0a2cb6c94aa549cdfe5e6dfbdc2b
2026-09-21 06:51:11 -07:00
Nicola Corti 9da1baccc8 Configure Swift formatting in CI (#58616)
Summary:
The format workflow currently runs on `macos-15`, whose default Xcode 16.4 toolchain does not meet the repository formatter's Swift 6.3 minimum. As a result, `format-swift.js` warns and skips Swift files.

Run the format job on `macos-26` and explicitly select Xcode 26.6.0 so that `swift format` 6.3 is available and Swift formatting is actually exercised in CI.

This does not include the unrelated C++ formatting change currently making the job red on `main`.

## Changelog:

[INTERNAL] [FIXED] - Configure Swift formatting in the format workflow

Pull Request resolved: https://github.com/react/react-native/pull/58616

Test Plan:
- `yarn prettier --check .github/workflows/format.yml` — passes.
- `swift format --version` — reports `6.3.0` locally.
- [GitHub format run](https://github.com/react/react-native/actions/runs/35590873668/job/106304725401) — the macOS 26 runner accepted Xcode 26.6.0, and `format-swift.js` completed without the missing Swift 6.3 warning. The job remains red because enabling the formatter exposes existing formatting changes (along with the unrelated C++ formatting issue already present on `main`).

Reviewed By: cipolleschi

Differential Revision: D120988250

Pulled By: cortinico

fbshipit-source-id: f21ae2b52041edf84bf142c770ffe0da2821654a
2026-09-21 04:13:47 -07:00
Nicola Corti 7a2963f2b5 Report formatting fixes on pull requests (#58464)
Summary:
Pull Request resolved: https://github.com/react/react-native/pull/58464

Add a GitHub Actions formatting check that runs the repository-wide formatter check and posts line-level suggested fixes through the GitHub API for files that need reformatting.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D119487616

fbshipit-source-id: e8534888824b5e56fa949aef0ab1e64fe73c8d96
2026-09-15 13:20:33 -07:00