Skip to content
This repository was archived by the owner on Dec 19, 2025. It is now read-only.

Commit 16dc18a

Browse files
committed
Use lerna
1 parent 109170c commit 16dc18a

31 files changed

Lines changed: 27410 additions & 7974 deletions

.github/workflows/ci.yml

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,53 @@ on:
44
push:
55
branches: [ main ]
66
paths-ignore:
7+
- "art/**"
78
- "docs/**"
89
- ".github/workflows/docs.yml"
9-
- "art/**"
10-
- "cli/**"
1110
pull_request:
1211
branches: [ main ]
1312
workflow_dispatch:
1413

1514
jobs:
16-
test:
15+
build:
1716
runs-on: ubuntu-latest
1817
strategy:
1918
matrix:
2019
node-version: [12.x, 14.x, 16.x, 18.x]
21-
2220
steps:
23-
- uses: actions/checkout@v2
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v2
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
- run: npm ci
29-
- run: npm run build
30-
- run: npm test
31-
env:
32-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33-
- name: Run codacy-coverage-reporter
34-
if: github.event_name == 'push'
35-
uses: codacy/codacy-coverage-reporter-action@master
36-
with:
37-
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
38-
coverage-reports: coverage/lcov.info
21+
- uses: actions/checkout@v2
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- name: Get npm cache directory
27+
id: npm-cache-dir
28+
run: |
29+
echo "::set-output name=dir::$(npm config get cache)"
30+
- name: Cache root node_modules
31+
id: cache-npm-root
32+
uses: actions/cache@v3
33+
with:
34+
path: |
35+
${{ steps.npm-cache-dir.outputs.dir }}
36+
./node_modules
37+
key: ${{ runner.os }}-node-root-${{ hashFiles('./package-lock.json') }}
38+
restore-keys: |
39+
${{ runner.os }}-node-root-
40+
- name: Install dependencies
41+
if: ${{ steps.cache-npm-root.outputs.cache-hit != 'true' }}
42+
run: npm ci
43+
- name: Lerna bootstrap
44+
run: npx lerna run bootstrap
45+
- name: Build
46+
run: npx lerna run build
47+
- name: Test
48+
run: npx lerna run test
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
- name: Run codacy-coverage-reporter
52+
if: github.event_name == 'push'
53+
uses: codacy/codacy-coverage-reporter-action@master
54+
with:
55+
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
56+
coverage-reports: coverage/lcov.info

.github/workflows/cli.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

cli/package.json

Lines changed: 0 additions & 30 deletions
This file was deleted.

cli/src/util.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

lerna.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3+
"useNx": true,
4+
"useWorkspaces": true,
5+
"version": "3.0.0"
6+
}

nx.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "node_modules/nx/schemas/nx-schema.json",
3+
"tasksRunnerOptions": {
4+
"default": {
5+
"runner": "nx/tasks-runners/default",
6+
"options": {
7+
"cacheableOperations": []
8+
}
9+
}
10+
},
11+
"targetDefaults": {
12+
"build": {
13+
"dependsOn": ["^build"]
14+
},
15+
"test": {
16+
"dependsOn": ["build"]
17+
},
18+
"package": {
19+
"dependsOn": ["build", "test"]
20+
}
21+
}
22+
}

0 commit comments

Comments
 (0)