Skip to content

Commit

Permalink
Move analisys scripts to .github folder (facebook#49123)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#49123

Previously, we used to have CI workflows scripts in a `react-native/scripts/circleci` folder.
Now that we are not using CircleCI anymore, we move those scripts to the `.github/workflow-scripts` folder.

## Changelog:
[Internal] - Move ci scripts to the `.github/workflow-scripts` folder

Reviewed By: cortinico, huntie

Differential Revision: D69047581

fbshipit-source-id: 6a5d8525e526cc7521d42e2be9530deb09914fdc
  • Loading branch information
cipolleschi authored and facebook-github-bot committed Feb 3, 2025
1 parent d654ae5 commit ae7175d
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ runs:
GITHUB_PR_NUMBER: ${{ github.event.number }}
- name: Lint code
shell: bash
run: ./scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
- name: Lint java
shell: bash
run: ./scripts/circleci/exec_swallow_error.sh yarn lint-java --check
run: ./.github/workflow-scripts/exec_swallow_error.sh yarn lint-java --check
- name: Verify not committing repo after running build
shell: bash
run: yarn run build --check
Expand All @@ -41,7 +41,7 @@ runs:
run: yarn test-typescript
- name: Check license
shell: bash
run: ./scripts/circleci/check_license.sh
run: ./.github/workflow-scripts/check_license.sh
- name: Check formatting
shell: bash
run: yarn run format-check
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ if [ -x "$(command -v shellcheck)" ]; then
if [ -n "$CIRCLE_CI" ]; then
results=( "$(find . -type f -not -path "*node_modules*" -not -path "*third-party*" -name '*.sh' -exec sh -c 'shellcheck "$1" -f json' -- {} \;)" )

cat <(echo shellcheck; printf '%s\n' "${results[@]}" | jq .,[] | jq -s . | jq --compact-output --raw-output '[ (.[] | .[] | . ) ]') | GITHUB_PR_NUMBER="$CIRCLE_PR_NUMBER" node scripts/circleci/code-analysis-bot.js

cat <(echo shellcheck; printf '%s\n' "${results[@]}" | jq .,[] | jq -s . | jq --compact-output --raw-output '[ (.[] | .[] | . ) ]') | GITHUB_PR_NUMBER="$GITHUB_PR_NUMBER" node packages/react-native-bots/code-analysis-bot.js
# check status
STATUS=$?
if [ $STATUS == 0 ]; then
Expand All @@ -38,4 +37,3 @@ else
echo 'shellcheck is not installed. See https://github.com/facebook/react-native/wiki/Development-Dependencies#shellcheck for instructions.'
exit 1
fi

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
set -e

# Make sure we don't introduce accidental references to PATENTS.
EXPECTED='scripts/circleci/check_license.sh'
EXPECTED='.github/workflow-scripts/check_license.sh'
ACTUAL=$(git grep -l PATENTS)

if [ "$EXPECTED" != "$ACTUAL" ]; then
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"",
"format": "npm run prettier && npm run clang-format",
"featureflags": "cd packages/react-native && yarn featureflags",
"lint-ci": "./scripts/circleci/analyze_code.sh && yarn shellcheck",
"lint-ci": "./.github/workflow-scripts/analyze_code.sh && yarn shellcheck",
"lint-java": "node ./scripts/lint-java.js",
"lint": "eslint .",
"prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"",
"print-packages": "node ./scripts/monorepo/print",
"shellcheck": "./scripts/circleci/analyze_scripts.sh",
"shellcheck": "./.github/workflow-scripts/analyze_scripts.sh",
"start": "cd packages/rn-tester && npm run start",
"set-version": "node ./scripts/releases/set-version.js",
"test-android": "./gradlew :packages:react-native:ReactAndroid:test",
Expand Down

0 comments on commit ae7175d

Please sign in to comment.