mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[ci] Split out babel-plugin-react-forget jest to its own job
This commit is contained in:
+27
-2
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
discover_yarn_workspaces:
|
||||
name: Discover yarn workspaces
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
@@ -15,6 +16,7 @@ jobs:
|
||||
- id: set-matrix
|
||||
run: echo "matrix=$(find forget/packages -mindepth 1 -maxdepth 1 -type d | sed 's!forget/packages/!!g' | tr '\n' ',' | sed s/.$// | jq -Rsc '. / "," - [""]')" >> $GITHUB_OUTPUT
|
||||
|
||||
# Hardcoded to improve parallelism for babel-plugin-react-forget
|
||||
lint:
|
||||
name: Lint babel-plugin-react-forget
|
||||
runs-on: ubuntu-latest
|
||||
@@ -25,7 +27,7 @@ jobs:
|
||||
node-version: 18.x
|
||||
cache: "yarn"
|
||||
cache-dependency-path: forget/yarn.lock
|
||||
- name: cache node_modules
|
||||
- name: Restore cached node_modules
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
@@ -37,6 +39,28 @@ jobs:
|
||||
- run: yarn workspace babel-plugin-react-forget lint
|
||||
working-directory: forget
|
||||
|
||||
# Hardcoded to improve parallelism for babel-plugin-react-forget
|
||||
jest:
|
||||
name: Jest babel-plugin-react-forget
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.x
|
||||
cache: "yarn"
|
||||
cache-dependency-path: forget/yarn.lock
|
||||
- name: Restore cached node_modules
|
||||
uses: actions/cache@v3
|
||||
id: node_modules
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
- run: yarn install --frozen-lockfile
|
||||
working-directory: forget
|
||||
- run: yarn workspace babel-plugin-react-forget jest
|
||||
working-directory: forget
|
||||
|
||||
test:
|
||||
name: Test ${{ matrix.workspace_name }}
|
||||
needs: discover_yarn_workspaces
|
||||
@@ -52,8 +76,9 @@ jobs:
|
||||
node-version: 18.x
|
||||
cache: "yarn"
|
||||
cache-dependency-path: forget/yarn.lock
|
||||
- name: cache node_modules
|
||||
- name: Restore cached node_modules
|
||||
uses: actions/cache@v3
|
||||
id: node_modules
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
],
|
||||
"scripts": {
|
||||
"build": "rimraf dist && tsc",
|
||||
"test": "concurrently -g -n jest,snap,sprout \"yarn jest\" \"yarn snap:ci\" \"yarn sprout:ci\"",
|
||||
"test": "concurrently -g -n snap,sprout \"yarn snap:ci\" \"yarn sprout:ci\"",
|
||||
"jest": "tsc && ts-node \"$(yarn --silent which jest)\"",
|
||||
"snap": "node ../snap/dist/main.js",
|
||||
"snap:build": "yarn workspace snap run build",
|
||||
|
||||
Reference in New Issue
Block a user