Collapse lint action into test-all workflow (#55427)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/55427

Following previous diffs, this now promotes the `lint` action to direct job steps.

**Motivation**

This has the advantage of making sub-steps in the GitHub UI visible, rather than running the 7 lint steps under a single banner.

I feel this is justified in the case of `lint`, although increasing the size of `.github/workflowsl/test-all.yml` slightly, because:
- Each step in this job is a distinct tool run with differing output, rather than one logical "action" — and this grouped output is therefore useful to the user.
- Lint failures are reasonably frequent for users, emphasising the above.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D92417807

fbshipit-source-id: ed24cfa2e581a528e80faec4128d280926f56613
This commit is contained in:
Alex Hunt authored and meta-codesync[bot] committed 2026-02-05 11:06:06 -08:00
1 parent 7112c5fd7a
commit 7e752341bd
2 files changed
+23 -41

No files matched your search

-37
View File
@@ -1,37 +0,0 @@
name: lint
description: Runs all the linters in the codebase
inputs:
node-version:
description: "The node.js version to use"
required: false
default: "22"
runs:
using: composite
steps:
- name: Setup node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ inputs.node-version }}
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Run shellcheck
shell: bash
run: yarn shellcheck
- name: Lint code
shell: bash
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
- name: Lint file structure
shell: bash
run: ./.github/workflow-scripts/lint_files.sh
- name: Run flowcheck
shell: bash
run: yarn flow-check
- name: Run typescript check
shell: bash
run: yarn test-typescript
- name: Check formatting
shell: bash
run: yarn run format-check
- name: Lint markdown
shell: bash
run: yarn run lint-markdown
+23 -4
View File
@@ -504,13 +504,32 @@ jobs:
lint:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Run all the linters
uses: ./.github/actions/lint
- name: Install dependencies
uses: ./.github/actions/yarn-install
- name: Lint file structure
shell: bash
run: ./.github/workflow-scripts/lint_files.sh
- name: Run shellcheck
shell: bash
run: ./.github/workflow-scripts/analyze_scripts.sh
- name: Prettier
shell: bash
run: yarn run format-check
- name: markdownlint
shell: bash
run: yarn run lint-markdown
- name: ESLint
shell: bash
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
- name: Flow
shell: bash
run: yarn flow-check
- name: TypeScript
shell: bash
run: yarn test-typescript
build_js_types:
runs-on: ubuntu-latest