feat(ci): load npm workspaces from package.json
parent
727025a2f3
commit
c3aa81be2f
|
|
@ -5,13 +5,31 @@ on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
workspaces:
|
||||||
|
name: List npm workspaces
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
packages: ${{ steps.set-matrix.outputs.packages }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: npm
|
||||||
|
- uses: ./.github/actions/retry
|
||||||
|
with:
|
||||||
|
command: npm ci --ignore-scripts
|
||||||
|
- id: set-matrix
|
||||||
|
run: |
|
||||||
|
echo "packages=$(npm query .workspace | jq -c '[.[].location]')" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
check:
|
check:
|
||||||
name: Typecheck & Test
|
name: Typecheck & Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
needs: workspaces
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
package:
|
package: ${{ fromJson(needs.workspaces.outputs.packages) }}
|
||||||
[ui-tui, web, apps/bootstrap-installer, apps/desktop, apps/shared]
|
|
||||||
fail-fast: false # report all failures, not just the first one
|
fail-fast: false # report all failures, not just the first one
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue