Skip to content

Commit 5eab8b4

Browse files
committed
Rework actions for faster PR CI
- Whitespace change in @turf/difference should rebuild/test difference and @turf/turf
1 parent 5f0d405 commit 5eab8b4

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.github/workflows/turf.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
name: CI build
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
- support/6.x
84
pull_request:
95
branches:
106
- master
11-
- support/6.x
127

138
permissions:
149
contents: read
@@ -24,6 +19,8 @@ jobs:
2419
steps:
2520
- name: Checkout
2621
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
2724

2825
- name: Install pnpm
2926
uses: pnpm/action-setup@v4
@@ -37,5 +34,8 @@ jobs:
3734
node-version: ${{ matrix.node-version }}
3835

3936
- run: pnpm install --frozen-lockfile
37+
- run: pnpm lerna run build --since origin/master --ignore @turf/turf
4038
- run: git diff --exit-code
41-
- run: pnpm test
39+
- run: pnpm lerna run test --since origin/master
40+
# note: does not run linting
41+
# note: does not run last-checks

nx.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"{projectRoot}/test/**",
2929
"{projectRoot}/types.ts"
3030
],
31-
"dependsOn": ["build"],
31+
"dependsOn": [],
3232
"cache": true
3333
},
3434
"last-checks": {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"lint:mrl": "mrl check",
1313
"lint:prettier": "prettier --check .",
1414
"preinstall": "npx only-allow pnpm",
15-
"prepare": "husky && lerna run build",
15+
"prepare": "husky",
1616
"test": "pnpm run lint && lerna run test && lerna run --scope @turf/turf last-checks"
1717
},
1818
"lint-staged": {

packages/turf-difference/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function difference(
5252
const properties = features.features[0].properties || {};
5353

5454
const differenced = polygonClipping.difference(geoms[0], ...geoms.slice(1));
55+
5556
if (differenced.length === 0) return null;
5657
if (differenced.length === 1) return polygon(differenced[0], properties);
5758
return multiPolygon(differenced, properties);

0 commit comments

Comments
 (0)