Skip to content

Commit 487e301

Browse files
committed
Add pnpm to steps, improve npm run ci cmd
1 parent f088194 commit 487e301

File tree

4 files changed

+28
-19
lines changed

4 files changed

+28
-19
lines changed

.github/workflows/main.yaml

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ jobs:
2828
- uses: actions/setup-node@v3
2929
with:
3030
node-version: '22.x'
31+
cache: 'pnpm'
32+
- uses: pnpm/action-setup@v3
33+
with:
34+
version: '10.x'
3135
- name: "Run checks"
3236
run: |
33-
npm run build:core
34-
npm ci
37+
npm run ci
3538
npm run lint
3639
npm run format:check
3740
npm run docs
@@ -58,6 +61,10 @@ jobs:
5861
- uses: actions/setup-node@v3
5962
with:
6063
node-version: ${{ matrix.versions.node }}
64+
cache: 'pnpm'
65+
- uses: pnpm/action-setup@v3
66+
with:
67+
version: '10.x'
6168
- name: Login to Docker Hub
6269
if: ${{ !github.event.pull_request.head.repo.fork && github.triggering_actor != 'dependabot[bot]' }}
6370
uses: docker/login-action@v3
@@ -68,10 +75,10 @@ jobs:
6875
run: npm run build:all
6976
- name: "Install dependencies"
7077
run: |
71-
npm ci
78+
npm run ci
7279
ci/run_dependencies.sh ${{ matrix.versions.weaviate }}
7380
- name: "Run tests without authentication tests"
74-
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test
81+
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm run test
7582
- name: "Stop Weaviate"
7683
run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }}
7784

@@ -89,17 +96,19 @@ jobs:
8996
- uses: actions/setup-node@v3
9097
with:
9198
node-version: ${{ matrix.versions.node }}
99+
cache: 'pnpm'
100+
- uses: pnpm/action-setup@v3
101+
with:
102+
version: '10.x'
92103
- name: Login to Docker Hub
93104
if: ${{ !github.event.pull_request.head.repo.fork && github.triggering_actor != 'dependabot[bot]' }}
94105
uses: docker/login-action@v3
95106
with:
96107
username: ${{secrets.DOCKER_USERNAME}}
97108
password: ${{secrets.DOCKER_PASSWORD}}
98-
- name: "Transpile the package"
99-
run: npm run build:all
100109
- name: "Install dependencies"
101110
run: |
102-
npm ci
111+
npm run ci
103112
ci/run_dependencies.sh ${{ matrix.versions.weaviate }}
104113
- name: "Run tests with authentication tests"
105114
if: ${{ !github.event.pull_request.head.repo.fork }}
@@ -108,7 +117,7 @@ jobs:
108117
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
109118
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
110119
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
111-
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm test
120+
run: WEAVIATE_VERSION=${{ matrix.versions.weaviate }} npm run test
112121
- name: "Stop Weaviate"
113122
run: ci/stop_dependencies.sh ${{ matrix.versions.weaviate }}
114123

@@ -127,7 +136,7 @@ jobs:
127136
with:
128137
node-version: '22.x'
129138
registry-url: 'https://registry.npmjs.org'
130-
- run: npm ci
139+
- run: npm run ci
131140
- run: npm run build:all
132141
- run: npm publish
133142
env:

package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
],
1313
"scripts": {
1414
"test": "pnpm --filter @weaviate/test test",
15-
"prepack": "npm run build",
1615
"lint": "eslint --ext .ts,.js .",
1716
"lint:fix": "npm run lint -- --fix",
1817
"lint:staged": "npm run format:check && npm run lint -- --cache",
@@ -22,10 +21,15 @@
2221
"refresh-schema": "./tools/refresh_schema.sh",
2322
"refresh-protos": "./tools/refresh_protos.sh",
2423
"docs": "typedoc --plugin typedoc-plugin-extras --favicon public/favicon.ico --out docs/ ./packages/core/src ./packages/node/src ./packages/web/src",
25-
"build:core": "cd packages/core && npm run build",
26-
"build:web": "cd packages/web && npm run build",
27-
"build:node": "cd packages/node && npm run build",
28-
"build:all": "npm run build:core && npm run build:web && npm run build:node"
24+
"install:core": "pnpm install --filter @weaviate/core... --no-frozen-lockfile",
25+
"install:node": "pnpm install --filter @weaviate/node... --no-frozen-lockfile",
26+
"install:web": "pnpm install --filter @weaviate/web... --no-frozen-lockfile",
27+
"install": "npm run install:core && npm run install:node && npm run install:web",
28+
"build:core": "pnpm install --filter @weaviate/core... run build",
29+
"build:node": "pnpm install --filter @weaviate/node... run build",
30+
"build:web": "pnpm install --filter @weaviate/web... run build",
31+
"build": "npm run build:core && npm run build:node && npm run build:web",
32+
"ci": "npm run install:core && npm run build:core && npm run install:node && npm run install:web"
2933
},
3034
"repository": {
3135
"type": "git",

packages/core/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,21 @@
5959
"@testcontainers/weaviate": "^10.14.0",
6060
"@types/express": "^4.17.21",
6161
"@types/isomorphic-fetch": "^0.0.36",
62-
"@types/jest": "^29.4.0",
6362
"@types/node": "^18.14.0",
6463
"@types/uuid": "^9.0.1",
6564
"@typescript-eslint/eslint-plugin": "^6.21.0",
6665
"@typescript-eslint/parser": "^6.21.0",
67-
"babel-jest": "^29.4.3",
6866
"eslint": "^8.35.0",
6967
"eslint-config-prettier": "^8.7.0",
7068
"eslint-plugin-prettier": "^4.2.1",
7169
"express": "^4.19.2",
7270
"grpc-tools": "^1.12.4",
7371
"husky": "^8.0.3",
74-
"jest": "^29.4.3",
7572
"lint-staged": "^13.2.0",
7673
"openapi-typescript": "^5.4.1",
7774
"prettier": "^2.8.4",
7875
"prettier-plugin-organize-imports": "^3.2.4",
7976
"protobufjs": "^7.2.6",
80-
"ts-jest": "^29.0.5",
8177
"ts-node": "^10.9.2",
8278
"ts-proto": "^1.163.0",
8379
"tsup": "^8.0.2",

packages/core/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"outDir": "./dist/core",
4040
"declaration": true,
4141
"rootDir": ".",
42-
"types": ["node", "uuid", "jest"]
42+
"types": ["node", "uuid"]
4343
},
4444
"include": ["src"],
4545
"exclude": ["src/**/*.test.ts", "dist/**/*"],

0 commit comments

Comments
 (0)