Repository navigation
[ci] Split Test All into per-area workflows filtered by paths-ignore #7
This file contains hidden or 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
| name: Test JS | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths-ignore: | |
| - '**/*.md' | |
| - '**/__docs__/**' | |
| - '**/LICENSE' | |
| push: | |
| branches: | |
| - main | |
| - '*-stable' | |
| permissions: | |
| contents: read | |
| actions: read | |
| concurrency: | |
| # A new push to a pull request makes the previous run obsolete, so cancel it | |
| # instead of spending (macOS) runner time on it. Runs on branches are never | |
| # cancelled: each one gets its own group. | |
| group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| if: github.repository == 'react/react-native' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Install dependencies | |
| uses: ./.github/actions/yarn-install | |
| - name: Run shellcheck | |
| shell: bash | |
| run: ./.github/workflow-scripts/analyze_scripts.sh | |
| - 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 (legacy deep imports / manual types) | |
| shell: bash | |
| run: yarn test-typescript-legacy | |
| test_js: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: ['24', '22.13.0'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Test JS | |
| uses: ./.github/actions/test-js | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| build_js_types: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/setup-node | |
| - name: Install dependencies | |
| uses: ./.github/actions/yarn-install | |
| - name: Build react-native package types | |
| shell: bash | |
| run: yarn build-types --skip-snapshot | |
| - name: Validate generated types | |
| shell: bash | |
| run: yarn test-generated-typescript |