Skip to content

Commit 8bc2314

Browse files
committed
undo core workspace dependency handling and update build scripts across multiple packages
1 parent 6dfb821 commit 8bc2314

File tree

39 files changed

+141
-224
lines changed

39 files changed

+141
-224
lines changed

.changeset/config.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,5 @@
1010
"version": true,
1111
"tag": false
1212
},
13-
"ignore": [
14-
"@apps/*",
15-
"@tools/*",
16-
"@human-protocol/core",
17-
"@apps/dashboard-server",
18-
"@apps/human-app-server",
19-
"@apps/reputation-oracle",
20-
"@tools/subgraph"
21-
]
13+
"ignore": ["@apps/*", "@tools/*"]
2214
}

.github/workflows/cd-core.yaml

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

.github/workflows/cd-packages.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ on:
2323
- "packages/apps/**"
2424
- "packages/examples/**"
2525
- "packages/sdk/python/**"
26-
- "packages/core/**"
2726

2827
jobs:
2928
publish:
@@ -57,9 +56,9 @@ jobs:
5756
# don't have its dependency and can't be build as well,
5857
# so we have to build all deps in their topological order first.
5958
- name: Build packages
60-
run: yarn workspaces foreach --all --no-private --exclude @human-protocol/core -pt run build
59+
run: yarn workspaces foreach --all --no-private -pt run build
6160
- name: Publish packages
62-
run: yarn workspaces foreach --all --no-private --exclude @human-protocol/core -pt npm publish --tolerate-republish --tag ${NPM_PUBLISH_TAG} --json | tee publish.log
61+
run: yarn workspaces foreach --all --no-private -pt npm publish --tolerate-republish --tag ${NPM_PUBLISH_TAG} --json | tee publish.log
6362
env:
6463
SKIP_PREPACK: true
6564
- name: Tag published packages

.github/workflows/cd-subgraph.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ jobs:
4848
echo "::set-output name=continue::$MATCH"
4949
- name: Install dependencies
5050
if: steps.filter_networks.outputs.continue == 'true'
51-
run: yarn install --immutable
51+
run: yarn workspaces focus @tools/subgraph
52+
- name: Build packages (scoped)
53+
if: steps.filter_networks.outputs.continue == 'true'
54+
run: yarn workspaces foreach -Rpt --from @tools/subgraph run build
5255
- name: Generate and build Subgraph
5356
if: steps.filter_networks.outputs.continue == 'true'
5457
run: yarn generate && yarn build

.github/workflows/ci-test-dashboard.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: "**"
66
paths:
7+
- "packages/core/**"
78
- "packages/sdk/typescript/human-protocol-sdk/**"
89
- "packages/apps/dashboard/**"
910

@@ -18,8 +19,8 @@ jobs:
1819
node-version-file: .nvmrc
1920
cache: yarn
2021
- name: Install dependencies
21-
run: yarn install --immutable
22-
- name: Build libs
23-
run: yarn build:libs
22+
run: yarn workspaces focus @apps/dashboard-server
23+
- name: Build libs (scoped)
24+
run: yarn workspaces foreach -Rpt --from @apps/dashboard-server run build
2425
- name: Run dashboard Server test
2526
run: yarn workspace @apps/dashboard-server test

.github/workflows/ci-test-faucet-server.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: "**"
66
paths:
7+
- "packages/core/**"
78
- "packages/sdk/typescript/human-protocol-sdk/**"
89
- "packages/apps/faucet/server/**"
910

@@ -18,9 +19,9 @@ jobs:
1819
node-version-file: .nvmrc
1920
cache: yarn
2021
- name: Install dependencies
21-
run: yarn install --immutable
22-
- name: Build libs
23-
run: yarn build:libs
22+
run: yarn workspaces focus @apps/faucet-server
23+
- name: Build libs (scoped)
24+
run: yarn workspaces foreach -Rpt --from @apps/faucet-server run build
2425
- name: Create .env file
2526
run: cp .env.example .env
2627
working-directory: packages/apps/faucet/server

.github/workflows/ci-test-fortune.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: "**"
66
paths:
7+
- "packages/core/**"
78
- "packages/sdk/typescript/human-protocol-sdk/**"
89
- "packages/apps/fortune/**"
910

@@ -18,9 +19,9 @@ jobs:
1819
node-version-file: .nvmrc
1920
cache: yarn
2021
- name: Install dependencies
21-
run: yarn install --immutable
22-
- name: Build libs
23-
run: yarn build:libs
22+
run: yarn workspaces focus @apps/fortune-exchange-oracle-server
23+
- name: Build libs (scoped)
24+
run: yarn workspaces foreach -Rpt --from @apps/fortune-exchange-oracle-server run build
2425
- name: Run Exchange Oracle tests
2526
run: yarn workspace @apps/fortune-exchange-oracle-server test
2627

@@ -34,8 +35,8 @@ jobs:
3435
node-version-file: .nvmrc
3536
cache: yarn
3637
- name: Install dependencies
37-
run: yarn install --immutable
38-
- name: Build libs
39-
run: yarn build:libs
38+
run: yarn workspaces focus @apps/fortune-recording-oracle
39+
- name: Build libs (scoped)
40+
run: yarn workspaces foreach -Rpt --from @apps/fortune-recording-oracle run build
4041
- name: Run Recording Oracle tests
4142
run: yarn workspace @apps/fortune-recording-oracle test

.github/workflows/ci-test-human-app.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: "**"
66
paths:
7+
- "packages/core/**"
78
- "packages/sdk/typescript/human-protocol-sdk/**"
89
- "packages/apps/human-app/**"
910

@@ -18,8 +19,8 @@ jobs:
1819
node-version-file: .nvmrc
1920
cache: yarn
2021
- name: Install dependencies
21-
run: yarn install --immutable
22-
- name: Build libs
23-
run: yarn build:libs
22+
run: yarn workspaces focus @apps/human-app-server
23+
- name: Build libs (scoped)
24+
run: yarn workspaces foreach -Rpt --from @apps/human-app-server run build
2425
- name: Run Job Human App unit tests
2526
run: yarn workspace @apps/human-app-server test

.github/workflows/ci-test-job-launcher.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: "**"
66
paths:
7+
- "packages/core/**"
78
- "packages/sdk/typescript/human-protocol-sdk/**"
89
- "packages/apps/job-launcher/**"
910

@@ -18,8 +19,8 @@ jobs:
1819
node-version-file: .nvmrc
1920
cache: yarn
2021
- name: Install dependencies
21-
run: yarn install --immutable
22-
- name: Build libs
23-
run: yarn build:libs
22+
run: yarn workspaces focus @apps/job-launcher-server
23+
- name: Build libs (scoped)
24+
run: yarn workspaces foreach -Rpt --from @apps/job-launcher-server run build
2425
- name: Run Job Launcher Server test
2526
run: yarn workspace @apps/job-launcher-server test

.github/workflows/ci-test-node-sdk.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches: "**"
66
paths:
7+
- "packages/core/**"
78
- "packages/sdk/typescript/human-protocol-sdk/**"
89

910
jobs:
@@ -17,6 +18,8 @@ jobs:
1718
node-version-file: .nvmrc
1819
cache: yarn
1920
- name: Install dependencies
20-
run: yarn install --immutable
21+
run: yarn workspaces focus @human-protocol/sdk
22+
- name: Build packages (scoped)
23+
run: yarn workspaces foreach -Rpt --from @human-protocol/sdk run build
2124
- name: Run Node.js SDK test
2225
run: yarn workspace @human-protocol/sdk test

0 commit comments

Comments
 (0)