-
Notifications
You must be signed in to change notification settings - Fork 24.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate analyse_code to GHA (#45247)
Summary: This migrates `analyse_code` to GHA into a single job called `lint`. ## Changelog: [INTERNAL] - Migrate analyse_code to GHA Pull Request resolved: #45247 Test Plan: CI Reviewed By: NickGerleman Differential Revision: D59283393 Pulled By: cortinico fbshipit-source-id: dcdc4828a551062b3706e6450614b8c94e1a7e81
- Loading branch information
1 parent
8db2995
commit c0977c3
Showing
6 changed files
with
57 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: lint | ||
description: Runs all the linters in the codebase | ||
inputs: | ||
node-version: | ||
description: "The node.js version to use" | ||
required: false | ||
default: "18" | ||
github-token: | ||
description: "The GitHub token used by pull-bot" | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup node.js | ||
uses: ./.github/actions/setup-node | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
- name: Yarn install | ||
shell: bash | ||
run: yarn install --non-interactive --frozen-lockfile | ||
- name: Run linters against modified files (analysis-bot) | ||
shell: bash | ||
run: yarn lint-ci | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github-token}} | ||
- name: Lint code | ||
shell: bash | ||
run: ./scripts/circleci/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 | ||
- name: Run flowcheck | ||
shell: bash | ||
run: yarn flow-check | ||
- name: Run typescript check | ||
shell: bash | ||
run: yarn test-typescript | ||
- name: Check license | ||
shell: bash | ||
run: ./scripts/circleci/check_license.sh | ||
- name: Check formatting | ||
shell: bash | ||
run: yarn run format-check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -645,9 +645,6 @@ jobs: | |
GRADLE_OPTS: "-Dorg.gradle.daemon=false" | ||
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs. | ||
ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a" | ||
# Repeated here, as the environment key in this executor will overwrite the one in defaults | ||
PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: ${{ secrets.GITHUB_ANALYSISBOT_TOKEN_A }} | ||
PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: ${{ secrets.GITHUB_ANALYSISBOT_TOKEN_B }} | ||
HERMES_WS_DIR: /tmp/hermes | ||
steps: | ||
- name: Add github.com to SSH known hosts | ||
|
@@ -943,3 +940,15 @@ jobs: | |
uses: ./.github/actions/test-js | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Run all the Linters | ||
uses: ./.github/actions/lint | ||
with: | ||
github-token: ${{ env.GH_TOKEN }} |
This file was deleted.
Oops, something went wrong.