@samitouri / QOS-React / commits / 27e9476f0a

[ci] Cleanup

- Made each workflow's name consistent - Rename each workflow file with consistent naming scheme - Promote flow-ci-ghaction to flow-ci ghstack-source-id: 490b643dcdbb5f6d853815064a1287109a17d259 Pull Request resolved: https://github.com/facebook/react/pull/30037

Lauren Tan committed Jun 22, 2024 at 12:33 UTC 27e9476f0aae99adc67b10ee2b78e8ee7dc61421
14 files changed +26 -61
.github/workflows/compiler_playground.yml renamed
+1 -1
@@ -1,4 +1,4 @@
1 -name: Compiler Playground
1 +name: (Compiler) Playground
2
3 on:
4 push:
.github/workflows/compiler_rust.yml renamed
+1 -1
@@ -1,4 +1,4 @@
1 -name: React Compiler (Rust)
1 +name: (Compiler) Rust
2
3 on:
4 push:
.github/workflows/compiler_typescript.yml renamed
+1 -1
@@ -1,4 +1,4 @@
1 -name: React Compiler (TypeScript)
1 +name: (Compiler) TypeScript
2
3 on:
4 push:
.github/workflows/devtools_check_repro.yml
+1 -1
@@ -1,4 +1,4 @@
1 -name: DevTools Check for bug repro
1 +name: (DevTools) Check for bug repro
2 on:
3 issues:
4 types: [opened, edited]
.github/workflows/runtime_commit_artifacts.yml renamed
+1 -1
@@ -1,4 +1,4 @@
1 -name: Commit Artifacts for Meta WWW and fbsource
1 +name: (Runtime) Commit Artifacts for Meta WWW and fbsource
2
3 on:
4 push:
.github/workflows/runtime_fizz.yml renamed
+1 -1
@@ -1,4 +1,4 @@
1 -name: Fizz
1 +name: (Runtime) Fizz
2
3 on:
4 push:
.github/workflows/runtime_flags.yml renamed
+1 -1
@@ -1,4 +1,4 @@
1 -name: Flags
1 +name: (Runtime) Flags
2
3 on:
4 push:
.github/workflows/runtime_flow.yml renamed
+2 -2
@@ -1,4 +1,4 @@
1 -name: Flow
1 +name: (Runtime) Flow
2
3 on:
4 push:
@@ -44,4 +44,4 @@ jobs:
44 path: "**/node_modules"
45 key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
46 - run: yarn install --frozen-lockfile
47 - - run: node ./scripts/tasks/flow-ci-ghaction ${{ matrix.flow_inline_config_shortname }}
47 + - run: node ./scripts/tasks/flow-ci ${{ matrix.flow_inline_config_shortname }}
.github/workflows/runtime_fuzz_tests.yml renamed
+1 -1
@@ -1,4 +1,4 @@
1 -name: facebook/react/fuzz_tests
1 +name: (Runtime) Fuzz tests
2 on:
3 schedule:
4 - cron: 0 * * * *
.github/workflows/runtime_test.yml
+1 -1
@@ -1,4 +1,4 @@
1 -name: React Runtime (Test)
1 +name: (Runtime) Test
2
3 on:
4 push:
.github/workflows/shared_lint.yml renamed
+1 -1
@@ -1,4 +1,4 @@
1 -name: Lint
1 +name: (Shared) Lint
2
3 on:
4 push:
.github/workflows/shared_stale.yml renamed
+1 -1
@@ -1,5 +1,5 @@
1 # Configuration for stale action workflow - https://github.com/actions/stale
2 -name: 'Manage stale issues and PRs'
2 +name: (Shared) Manage stale issues and PRs
3 on:
4 schedule:
5 # Run hourly
scripts/tasks/flow-ci-ghaction.js deleted
-30
@@ -1,30 +0,0 @@
1 -/**
2 - * Copyright (c) Meta Platforms, Inc. and affiliates.
3 - *
4 - * This source code is licensed under the MIT license found in the
5 - * LICENSE file in the root directory of this source tree.
6 - */
7 -
8 -'use strict';
9 -
10 -process.on('unhandledRejection', err => {
11 - throw err;
12 -});
13 -
14 -const runFlow = require('../flow/runFlow');
15 -const inlinedHostConfigs = require('../shared/inlinedHostConfigs');
16 -
17 -async function check(shortName) {
18 - if (shortName == null) {
19 - throw new Error('Expected an inlinedHostConfig shortName');
20 - }
21 - const rendererInfo = inlinedHostConfigs.find(
22 - config => config.shortName === shortName
23 - );
24 - if (rendererInfo.isFlowTyped) {
25 - await runFlow(rendererInfo.shortName, ['check']);
26 - console.log();
27 - }
28 -}
29 -
30 -check(process.argv[2]);
scripts/tasks/flow-ci.js
+13 -18
@@ -14,24 +14,19 @@ process.on('unhandledRejection', err => {
14 const runFlow = require('../flow/runFlow');
15 const inlinedHostConfigs = require('../shared/inlinedHostConfigs');
16
17 -// Parallelize tests across multiple tasks.
18 -const nodeTotal = process.env.CIRCLE_NODE_TOTAL
19 - ? parseInt(process.env.CIRCLE_NODE_TOTAL, 10)
20 - : 1;
21 -const nodeIndex = process.env.CIRCLE_NODE_INDEX
22 - ? parseInt(process.env.CIRCLE_NODE_INDEX, 10)
23 - : 0;
24 -
25 -async function checkAll() {
26 - for (let i = 0; i < inlinedHostConfigs.length; i++) {
27 - if (i % nodeTotal === nodeIndex) {
28 - const rendererInfo = inlinedHostConfigs[i];
29 - if (rendererInfo.isFlowTyped) {
30 - await runFlow(rendererInfo.shortName, ['check']);
31 - console.log();
32 - }
33 - }
17 +async function check(shortName) {
18 + if (shortName == null) {
19 + throw new Error('Expected an inlinedHostConfig shortName');
20 + }
21 + const rendererInfo = inlinedHostConfigs.find(
22 + config => config.shortName === shortName
23 + );
24 + if (rendererInfo == null) {
25 + throw new Error(`Could not find inlinedHostConfig for ${shortName}`);
26 + }
27 + if (rendererInfo.isFlowTyped) {
28 + await runFlow(rendererInfo.shortName, ['check']);
29 }
30 }
31
37 -checkAll();
32 +check(process.argv[2]);