Skip to content

Commit 5d60cdf

Browse files
authored
chore: Update Turbo to v2.2 (amannn#1449)
Fixes amannn#1431 **Changes** - Initial execution of the `main` workflow: [12m 55s](https://github.com/amannn/next-intl/actions/runs/11462382739/job/31893635415) - Fully parallel: [9m 52s](https://github.com/amannn/next-intl/actions/runs/11481323357/job/31951728474) - Full turbo 🚀: [1m 9s](https://github.com/amannn/next-intl/actions/runs/11482176723/job/31954582003) One thing that's missing is getting `--affected` to work correctly (see warning in [job](https://github.com/amannn/next-intl/actions/runs/11482906244/job/31957091334?pr=1449)).
1 parent 1fae75b commit 5d60cdf

File tree

5 files changed

+57
-52
lines changed

5 files changed

+57
-52
lines changed

.github/workflows/main.yml

+20-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ jobs:
1212
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
1313
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
1414
steps:
15+
# General setup
1516
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0 # For Turborepo
1619
- uses: pnpm/action-setup@v4
1720
- uses: actions/setup-node@v4
1821
with:
@@ -23,13 +26,23 @@ jobs:
2326
# Next.js caching
2427
- uses: actions/cache@v4
2528
with:
26-
path: ${{ github.workspace }}/examples/*/.next/cache
29+
path: |
30+
${{ github.workspace }}/examples/*/.next/cache
31+
${{ github.workspace }}/docs/.next/cache
2732
key: ${{ runner.os }}-nextjs-${{ hashFiles('pnpm-lock.yaml') }}
2833

29-
# Setting up playwright in one example is sufficient
30-
- run: pnpm --filter example-app-router-playground exec playwright install --with-deps
34+
# Playwright (incl. caching)
35+
- id: playwright-version
36+
run: |
37+
version=$(pnpm --filter example-app-router exec playwright --version | awk '{print $2}')
38+
echo "version=$version" >> "$GITHUB_OUTPUT"
39+
- uses: actions/cache@v4
40+
id: playwright-cache
41+
with:
42+
path: ~/.cache/ms-playwright
43+
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.version }}
44+
- run: pnpm --filter example-app-router exec playwright install --with-deps
45+
if: steps.playwright-cache.outputs.cache-hit != 'true'
3146

32-
- run: pnpm run build
33-
- run: pnpm run lint
34-
- run: pnpm run test
35-
- run: pnpm run size
47+
# Main tasks
48+
- run: pnpm turbo run lint build test size --affected

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ node_modules/
77
dist/
88
.next/
99
tsconfig.tsbuildinfo
10+
.turbo

package.json

+2-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
"name": "root",
33
"private": true,
44
"scripts": {
5-
"build": "turbo run build --env-mode=loose",
6-
"test": "turbo run test --concurrency 1 --env-mode=loose",
7-
"lint": "turbo run lint --env-mode=loose",
8-
"postinstall": "turbo run build --filter './packages/**' --env-mode=loose",
9-
"size": "turbo run size --env-mode=loose",
5+
"postinstall": "turbo run build --filter './packages/**'",
106
"publish": "lerna publish"
117
},
128
"devDependencies": {
@@ -24,7 +20,7 @@
2420
"conventional-changelog-conventionalcommits": "^7.0.0",
2521
"execa": "^9.2.0",
2622
"rollup": "^4.18.0",
27-
"turbo": "^2.0.4"
23+
"turbo": "^2.2.3"
2824
},
2925
"packageManager": "[email protected]"
3026
}

pnpm-lock.yaml

+29-29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

turbo.json

+5-10
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,16 @@
33
"tasks": {
44
"build": {
55
"dependsOn": ["^build"],
6-
"outputs": [
7-
"dist/**/*.ts",
8-
"dist/**/*.tsx",
9-
"dist/**/*.mjs",
10-
"dist/**/*.js",
11-
".next/**",
12-
"!.next/cache/**"
13-
]
6+
"outputs": ["dist/**", ".next/**", "!.next/cache/**", "build/**"]
7+
},
8+
"lint": {
9+
"dependsOn": ["^build"]
1410
},
1511
"test": {
1612
"dependsOn": ["build"]
1713
},
1814
"size": {
1915
"dependsOn": ["build"]
20-
},
21-
"lint": {}
16+
}
2217
}
2318
}

0 commit comments

Comments
 (0)