Skip to content

Commit 8a05757

Browse files
committed
chore: update turbo config
This commit cleans up and updates the turbo config so that: 1. Tests and fixes can run on the [root package](https://turbo.build/repo/docs/crafting-your-repository/configuring-tasks#registering-root-tasks), e.g. to format or lint any files that don't exist inside a workspace package 2. More config is shared and we don't have as much config scoped to individual packages 3. `pnpm install` automatically runs at the right times (i.e. you don't have to manually run an install ever)
1 parent 1b5195a commit 8a05757

File tree

14 files changed

+143
-121
lines changed

14 files changed

+143
-121
lines changed

.github/workflows/ci-turbo-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
- name: Cache for Turbo
3434
uses: rharkor/[email protected]
3535
- name: Test
36-
run: pnpm test:ci
36+
run: pnpm turbo test

apps/api-reference/turbo.json

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,11 @@
33
"extends": ["//"],
44
"tasks": {
55
"build": {
6-
"dependsOn": ["pull:env", "^build"],
7-
"outputs": [".next/**", "!.next/cache/**"],
86
"env": [
97
"WALLETCONNECT_PROJECT_ID",
108
"AMPLITUDE_API_KEY",
119
"GOOGLE_ANALYTICS_ID"
1210
]
13-
},
14-
"pull:env": {
15-
"outputs": [".env.local"],
16-
"cache": false
17-
},
18-
"start:dev": {
19-
"dependsOn": ["pull:env"],
20-
"persistent": true,
21-
"cache": false
22-
},
23-
"start:prod": {
24-
"dependsOn": ["build"],
25-
"persistent": true,
26-
"cache": false
2711
}
2812
}
2913
}

apps/entropy-debugger/turbo.json

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

apps/hermes/client/js/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,12 @@ The [HermesClient](./src/examples/HermesClient.ts) example demonstrates both the
7676
examples above. To run the example:
7777

7878
1. Clone [the Pyth monorepo](https://github.com/pyth-network/pyth-crosschain)
79-
2. In the root of the monorepo, run `pnpm example:hermes-client -- <args>`. For
80-
example, to print BTC and ETH price feeds in the testnet network, run:
79+
2. In the root of the monorepo, run `pnpm turbo --filter
80+
@pythnetwork/hermes-client example -- <args>`. For example, to print BTC and
81+
ETH price feeds in the testnet network, run:
8182

8283
```bash
83-
pnpm example:hermes-client -- \
84+
pnpm turbo --filter @pythnetwork/hermes-client example -- \
8485
--endpoint https://hermes.pyth.network \
8586
--price-ids \
8687
0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43 \

apps/hermes/client/js/turbo.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,23 @@
33
"extends": ["//"],
44
"tasks": {
55
"build:schemas": {
6-
"dependsOn": ["pull:schema"],
6+
"dependsOn": ["//#install:modules", "pull:schema"],
77
"inputs": ["schema.json"],
88
"outputs": ["src/zodSchemas.ts"]
99
},
1010
"build:typescript": {
11-
"dependsOn": ["build:schemas", "^build"],
11+
"dependsOn": ["//#install:modules", "build:schemas", "^build"],
1212
"outputs": ["lib/**"]
1313
},
1414
"build": {
1515
"dependsOn": ["build:typescript", "build:schemas"]
1616
},
1717
"example": {
18-
"dependsOn": ["build"],
18+
"dependsOn": ["//#install:modules", "build"],
1919
"cache": false
2020
},
2121
"pull:schema": {
22+
"dependsOn": ["//#install:modules"],
2223
"outputs": ["schema.json"],
2324
"cache": false
2425
}

apps/insights/turbo.json

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"extends": ["//"],
44
"tasks": {
55
"build": {
6-
"dependsOn": ["pull:env", "^build"],
7-
"outputs": [".next/**", "!.next/cache/**"],
86
"env": [
97
"VERCEL_ENV",
108
"GOOGLE_ANALYTICS_ID",
@@ -17,36 +15,28 @@
1715
]
1816
},
1917
"fix:lint": {
20-
"dependsOn": ["fix:lint:eslint", "fix:lint:stylelint"],
21-
"cache": false
18+
"dependsOn": [
19+
"//#install:modules",
20+
"fix:lint:eslint",
21+
"fix:lint:stylelint"
22+
]
2223
},
2324
"fix:lint:eslint": {
24-
"dependsOn": ["^build"],
25+
"dependsOn": ["//#install:modules", "^build"],
2526
"cache": false
2627
},
2728
"fix:lint:stylelint": {
28-
"cache": false
29-
},
30-
"pull:env": {
31-
"outputs": [".env.local"],
32-
"cache": false
33-
},
34-
"start:dev": {
35-
"dependsOn": ["pull:env"],
36-
"persistent": true,
37-
"cache": false
38-
},
39-
"start:prod": {
40-
"dependsOn": ["build"],
41-
"persistent": true,
29+
"dependsOn": ["//#install:modules"],
4230
"cache": false
4331
},
4432
"test:lint": {
4533
"dependsOn": ["test:lint:eslint", "test:lint:stylelint"]
4634
},
4735
"test:lint:eslint": {
48-
"dependsOn": ["^build"]
36+
"dependsOn": ["//#install:modules", "^build"]
4937
},
50-
"test:lint:stylelint": {}
38+
"test:lint:stylelint": {
39+
"dependsOn": ["//#install:modules"]
40+
}
5141
}
5242
}

apps/staking/turbo.json

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
"extends": ["//"],
44
"tasks": {
55
"build": {
6-
"dependsOn": ["pull:env", "^build"],
7-
"outputs": [".next/**", "!.next/cache/**"],
86
"env": [
97
"IP_ALLOWLIST",
108
"GOVERNANCE_ONLY_REGIONS",
@@ -17,23 +15,13 @@
1715
"GOOGLE_ANALYTICS_ID"
1816
]
1917
},
20-
"pull:env": {
21-
"outputs": [".env.local"],
22-
"cache": false
23-
},
2418
"start:dev": {
2519
"dependsOn": [
20+
"//#install:modules",
2621
"pull:env",
2722
"@pythnetwork/hermes-client#build",
2823
"@pythnetwork/solana-utils#build"
29-
],
30-
"persistent": true,
31-
"cache": false
32-
},
33-
"start:prod": {
34-
"dependsOn": ["build"],
35-
"persistent": true,
36-
"cache": false
24+
]
3725
}
3826
}
3927
}

flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@
1818
cli = prev.lib.mkCli "cli" {
1919
_noAll = true;
2020

21-
start = "${prev.lib.getExe prev.pnpm} start:dev";
21+
start = "${prev.lib.getExe prev.pnpm} turbo start:dev";
2222

2323
test = {
2424
nix = {
2525
lint = "${prev.statix}/bin/statix check --ignore node_modules .";
2626
dead-code = "${prev.deadnix}/bin/deadnix --exclude ./node_modules .";
2727
format = "${prev.alejandra}/bin/alejandra --exclude ./node_modules --check .";
2828
};
29-
turbo = "${prev.lib.getExe prev.pnpm} test -- --ui stream";
29+
turbo = "${prev.lib.getExe prev.pnpm} turbo test -- --ui stream";
3030
};
3131

3232
fix = {
@@ -35,7 +35,7 @@
3535
dead-code = "${prev.deadnix}/bin/deadnix --exclude ./node_modules -e .";
3636
format = "${prev.alejandra}/bin/alejandra --exclude ./node_modules .";
3737
};
38-
turbo = "${prev.lib.getExe prev.pnpm} fix -- --ui stream";
38+
turbo = "${prev.lib.getExe prev.pnpm} turbo fix -- --ui stream";
3939
};
4040
};
4141
};

governance/xc_admin/packages/xc_admin_frontend/turbo.json

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,14 @@
33
"extends": ["//"],
44
"tasks": {
55
"build": {
6-
"dependsOn": ["pull:env", "^build"],
7-
"outputs": [".next/**", "!.next/cache/**"],
86
"env": [
97
"BUILD_STANDALONE",
108
"NEXT_PUBLIC_MAINNET_RPC",
119
"NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID"
1210
]
1311
},
14-
"pull:env": {
15-
"outputs": [".env.local"],
16-
"cache": false
17-
},
1812
"start:dev": {
19-
"dependsOn": ["pull:env", "^build"],
20-
"persistent": true,
21-
"cache": false
22-
},
23-
"start:prod": {
24-
"dependsOn": ["build"],
25-
"persistent": true,
26-
"cache": false
13+
"dependsOn": ["//#install:modules", "pull:env", "^build"]
2714
}
2815
}
2916
}

lazer/contracts/solana/turbo.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
"$schema": "https://turbo.build/schema.json",
33
"extends": ["//"],
44
"tasks": {
5-
"test": {
6-
"dependsOn": ["test:format"]
7-
},
85
"test:anchor": {}
96
}
107
}

0 commit comments

Comments
 (0)