[ci] Run yarn workspace tests in parallel

This commit is contained in:
Lauren Tan
2023-08-18 14:10:41 -04:00
parent a905a02901
commit 9e332ee05a
3 changed files with 19 additions and 4 deletions
+17 -2
View File
@@ -6,8 +6,23 @@ on:
pull_request:
jobs:
forget:
discover_yarn_workspaces:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- 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
forget:
name: Test ${{ matrix.workspace_name }}
needs: discover_yarn_workspaces
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
workspace_name: ${{ fromJSON(needs.discover_yarn_workspaces.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
@@ -22,5 +37,5 @@ jobs:
key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- run: yarn install --frozen-lockfile
working-directory: forget
- run: yarn test
- run: yarn workspace ${{ matrix.workspace_name }} test
working-directory: forget
@@ -13,7 +13,7 @@ import ReactForgetBabelPlugin, {
type CompilerError,
type CompilerErrorDetail,
type PluginOptions,
} from "babel-plugin-react-forget";
} from "babel-plugin-react-forget/src";
import type { Rule } from "eslint";
import * as HermesParser from "hermes-parser";
@@ -1,5 +1,5 @@
{
"name": "ochang_js_fuzzer",
"name": "js-fuzzer",
"version": "1.0.0",
"description": "",
"main": "run.js",