Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ inputs:
description: "The node.js version to use"
required: false
default: "22"
github-token:
description: "The GitHub token used by pull-bot"
required: true
runs:
using: composite
steps:
Expand All @@ -17,12 +14,9 @@ runs:
node-version: ${{ inputs.node-version }}
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Run linters against modified files (analysis-bot)
- name: Run shellcheck
shell: bash
run: yarn lint-ci
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
GITHUB_PR_NUMBER: ${{ github.event.number }}
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
Expand Down
24 changes: 0 additions & 24 deletions .github/workflow-scripts/analyze_code.sh

This file was deleted.

35 changes: 33 additions & 2 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@ jobs:

echo "Should I run E2E tests? ${{ inputs.run-e2e-tests }}"

check_code_changes:
runs-on: ubuntu-latest
if: github.repository == 'facebook/react-native'
outputs:
debugger_shell: ${{ steps.filter.outputs.debugger_shell }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Check for code changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
id: filter
with:
filters: |
debugger_shell:
- 'packages/debugger-shell/**'
- 'scripts/debugger-shell/**'

prebuild_apple_dependencies:
if: github.repository == 'facebook/react-native'
uses: ./.github/workflows/prebuild-ios-dependencies.yml
Expand Down Expand Up @@ -494,8 +511,22 @@ jobs:
uses: actions/checkout@v6
- name: Run all the linters
uses: ./.github/actions/lint
with:
github-token: ${{ env.GH_TOKEN }}

build_debugger_shell:
runs-on: ubuntu-latest
needs: check_code_changes
if: needs.check_code_changes.outputs.debugger_shell == 'true'
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup node.js
uses: ./.github/actions/setup-node
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Build packages
run: yarn build
- name: Verify debugger-shell build
run: node scripts/debugger-shell/build-binary.js

# This job should help with the E2E flakyness.
# In case E2E tests fails, it launches a new retry-workflow workflow, passing the current run_id as input.
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"format": "npm run prettier && npm run clang-format",
"featureflags": "yarn --cwd packages/react-native featureflags",
"js-api-diff": "node ./scripts/js-api/diff-api-snapshot",
"lint-ci": "./.github/workflow-scripts/analyze_code.sh && yarn shellcheck",
"lint-kotlin-check": "./gradlew ktfmtCheck",
"lint-kotlin": "./gradlew ktfmtFormat",
"lint-markdown": "markdownlint-cli2 2>&1",
Expand Down
12 changes: 0 additions & 12 deletions private/react-native-bots/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,3 @@ So, for example:
cd private/react-native-bots && yarn
DANGER_GITHUB_API_TOKEN=ghp_<REDACTED> yarn danger pr https://github.com/facebook/react-native/pull/1234
```

## Code Analysis Bot

The code analysis bot provides lint and other results as inline reviews on GitHub. It runs as part of the Circle CI analysis workflow.

If you want to test changes to the Code Analysis Bot, I'd recommend checking out an existing PR and then running the `analyze pr` command.
You'll need a GitHub token. You can re-use this one: `312d354b5c36f082cfe9` `07973d757026bdd9f196` (just remove the space).
So, for example:

```
GITHUB_TOKEN=[ENV_ABOVE] GITHUB_PR_NUMBER=1234 yarn lint-ci
```
Loading
Loading