Skip to content

Commit

Permalink
[ci] Cleanup
Browse files Browse the repository at this point in the history
- 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: #30037
  • Loading branch information
poteto committed Jun 22, 2024
1 parent 94bcf25 commit 5079cfa
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Compiler Playground
name: (Compiler) Playground

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: React Compiler (Rust)
name: (Compiler) Rust

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: React Compiler (TypeScript)
name: (Compiler) TypeScript

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/devtools_check_repro.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DevTools Check for bug repro
name: (DevTools) Check for bug repro
on:
issues:
types: [opened, edited]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Commit Artifacts for Meta WWW and fbsource
name: (Runtime) Commit Artifacts for Meta WWW and fbsource

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Fizz
name: (Runtime) Fizz

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Flags
name: (Runtime) Flags

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Flow
name: (Runtime) Flow

on:
push:
Expand Down Expand Up @@ -44,4 +44,4 @@ jobs:
path: "**/node_modules"
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- run: yarn install --frozen-lockfile
- run: node ./scripts/tasks/flow-ci-ghaction ${{ matrix.flow_inline_config_shortname }}
- run: node ./scripts/tasks/flow-ci ${{ matrix.flow_inline_config_shortname }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: facebook/react/fuzz_tests
name: (Runtime) Fuzz tests
on:
schedule:
- cron: 0 * * * *
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/runtime_test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: React Runtime (Test)
name: (Runtime) Test

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint
name: (Shared) Lint

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Configuration for stale action workflow - https://github.com/actions/stale
name: 'Manage stale issues and PRs'
name: (Shared) Manage stale issues and PRs
on:
schedule:
# Run hourly
Expand Down
30 changes: 0 additions & 30 deletions scripts/tasks/flow-ci-ghaction.js

This file was deleted.

31 changes: 13 additions & 18 deletions scripts/tasks/flow-ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,19 @@ process.on('unhandledRejection', err => {
const runFlow = require('../flow/runFlow');
const inlinedHostConfigs = require('../shared/inlinedHostConfigs');

// Parallelize tests across multiple tasks.
const nodeTotal = process.env.CIRCLE_NODE_TOTAL
? parseInt(process.env.CIRCLE_NODE_TOTAL, 10)
: 1;
const nodeIndex = process.env.CIRCLE_NODE_INDEX
? parseInt(process.env.CIRCLE_NODE_INDEX, 10)
: 0;

async function checkAll() {
for (let i = 0; i < inlinedHostConfigs.length; i++) {
if (i % nodeTotal === nodeIndex) {
const rendererInfo = inlinedHostConfigs[i];
if (rendererInfo.isFlowTyped) {
await runFlow(rendererInfo.shortName, ['check']);
console.log();
}
}
async function check(shortName) {
if (shortName == null) {
throw new Error('Expected an inlinedHostConfig shortName');
}
const rendererInfo = inlinedHostConfigs.find(
config => config.shortName === shortName
);
if (rendererInfo == null) {
throw new Error(`Could not find inlinedHostConfig for ${shortName}`);
}
if (rendererInfo.isFlowTyped) {
await runFlow(rendererInfo.shortName, ['check']);
}
}

checkAll();
check(process.argv[2]);

0 comments on commit 5079cfa

Please sign in to comment.