Skip to content

Commit 0cca291

Browse files
committed
use yarn in github workflow
1 parent 50de0cf commit 0cca291

14 files changed

+597
-1170
lines changed

Diff for: .github/workflows/build_and_lint.yml

+12-14
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,17 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717

18-
- uses: pnpm/action-setup@v4
19-
with:
20-
version: 9.15.0
18+
- name: Corepack
19+
run: corepack enable
2120

2221
- name: Install
23-
run: pnpm install
22+
run: yarn
2423

2524
- name: Linting
26-
run: pnpm run lint
25+
run: yarn lint
2726

2827
- name: Build on Ubuntu
29-
run: pnpm run build
28+
run: yarn build
3029

3130
- name: All generated code is commited
3231
run: |
@@ -44,22 +43,21 @@ jobs:
4443
steps:
4544
- uses: actions/checkout@v4
4645

47-
- uses: pnpm/action-setup@v4
48-
with:
49-
version: 9.15.0
50-
5146
- uses: actions/setup-node@v4
5247
with:
5348
node-version-file: .github/files/.nvmrc
5449

5550
- name: NodeJS version
5651
run: node -v
5752

58-
- name: PNPM version
59-
run: pnpm --version
53+
- name: Corepack
54+
run: corepack enable
55+
56+
- name: Yarn version
57+
run: yarn --version
6058

6159
- name: Install
62-
run: pnpm install
60+
run: yarn
6361

6462
- name: Build
65-
run: pnpm run build
63+
run: yarn build

Diff for: .github/workflows/release_pr.yml

-4
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ jobs:
3535
fetch-depth: 0
3636
ref: ${{ github.event.inputs.base-branch }}
3737

38-
- uses: pnpm/action-setup@v4
39-
with:
40-
version: 9.15.0
41-
4238
- run: npm install --prefix=.github/scripts --no-package-lock
4339

4440
- name: Bump package versions

Diff for: .github/workflows/release_publish.yml

+6-7
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525

26-
- uses: pnpm/[email protected]
27-
with:
28-
version: 9.15.0
26+
- name: Corepack
27+
run: corepack enable
2928

30-
- run: pnpm install
29+
- run: yarn
3130

3231
- name: Build
33-
run: pnpm run build
32+
run: yarn build
3433

3534
- name: Cache build artifacts
3635
uses: actions/cache/[email protected]
@@ -39,9 +38,9 @@ jobs:
3938
key: ${{ github.sha }}-release:build
4039

4140
- name: Dry-run publishing
42-
run: pnpm publish -r --no-git-checks --dry-run
41+
run: yarn publish -r --no-git-checks --dry-run
4342

4443
- name: Publish to NPM
4544
run: |
4645
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
47-
pnpm publish -r --publish-branch ${{github.event.pull_request.base.ref}} --access public --no-git-checks
46+
yarn npm publish -r --publish-branch ${{github.event.pull_request.base.ref}} --access public --no-git-checks

Diff for: .github/workflows/test_LTS.yml

-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@ jobs:
1414
uses: ./.github/workflows/tests.yml
1515
with:
1616
version: "latest"
17-
secrets:
18-
eventstore_cloud_id: ${{ secrets.EVENTSTORE_CLOUD_ID }}
19-
tailscale_auth: ${{ secrets.TAILSCALE_AUTH }}

Diff for: .github/workflows/test_dispatch.yml

-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@ jobs:
1414
uses: ./.github/workflows/tests.yml
1515
with:
1616
version: ${{ inputs.version }}
17-
secrets:
18-
eventstore_cloud_id: ${{ secrets.EVENTSTORE_CLOUD_ID }}
19-
tailscale_auth: ${{ secrets.TAILSCALE_AUTH }}

Diff for: .github/workflows/test_ee.yml

+10-23
Original file line numberDiff line numberDiff line change
@@ -17,35 +17,24 @@ jobs:
1717
group:
1818
- name: plugins
1919
path: ./src/plugins
20-
tailscale: true
2120
env:
2221
# GitHub only passes secrets to the main repo, so we need to skip some things if they are unavailable
2322
SECRETS_AVAILABLE: ${{ secrets.EVENTSTORE_CLOUD_ID != null }}
2423
KURRENT_VERSION: "24.2.0-jammy"
2524
runs-on: ubuntu-latest
2625
steps:
2726
- uses: actions/checkout@v4
28-
- name: Connect to tailscale
29-
if: ${{ matrix.group.tailscale && env.SECRETS_AVAILABLE == 'true' }}
30-
run: |
31-
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/eoan.gpg | sudo apt-key add -
32-
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/eoan.list | sudo tee /etc/apt/sources.list.d/tailscale.list
33-
sudo apt-get update
34-
sudo apt-get install tailscale
35-
sudo tailscale up --authkey ${{ secrets.TAILSCALE_AUTH }} --hostname "node-client-ci-${{ env.KURRENT_VERSION }}-$(date +'%Y-%m-%d-%H-%M-%S')" --advertise-tags=tag:ci --accept-routes
36-
37-
- uses: pnpm/action-setup@v4
38-
with:
39-
version: 9.15.0
4027

4128
- uses: actions/setup-node@v4
4229
with:
4330
node-version-file: .github/files/.nvmrc
44-
cache: 'pnpm'
4531

4632
- name: NodeJS version
4733
run: node -v
4834

35+
- name: Corepack
36+
run: corepack enable
37+
4938
- name: Login to Cloudsmith
5039
uses: docker/login-action@v3
5140
with:
@@ -54,17 +43,15 @@ jobs:
5443
password: ${{ secrets.CLOUDSMITH_CICD_TOKEN }}
5544

5645
- name: Install
57-
run: pnpm install
46+
run: yarn
47+
48+
- name: Corepack
49+
run: corepack enable
5850

5951
- name: Build
60-
run: pnpm run build
52+
run: yarn build
6153

6254
- name: Run Tests
63-
run: pnpm run test ${{ matrix.group.path }} --ci --run-in-band --forceExit
55+
run: yarn test ${{ matrix.group.path }} --ci --run-in-band --forceExit
6456
env:
65-
KURRENT_IMAGE: eventstore-ee:${{ env.KURRENT_VERSION }}
66-
EVENTSTORE_CLOUD_ID: ${{ secrets.EVENTSTORE_CLOUD_ID }}
67-
68-
- name: Disconnect from tailscale
69-
if: ${{ always() && matrix.group.tailscale && env.SECRETS_AVAILABLE == 'true' }}
70-
run: sudo tailscale down
57+
KURRENT_IMAGE: eventstore-ee:${{ env.KURRENT_VERSION }}

Diff for: .github/workflows/test_next.yml

-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@ jobs:
1414
uses: ./.github/workflows/tests.yml
1515
with:
1616
version: "ci"
17-
secrets:
18-
eventstore_cloud_id: ${{ secrets.EVENTSTORE_CLOUD_ID }}
19-
tailscale_auth: ${{ secrets.TAILSCALE_AUTH }}

Diff for: .github/workflows/test_previous_LTS.yml

-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,3 @@ jobs:
1414
uses: ./.github/workflows/tests.yml
1515
with:
1616
version: "previous-lts"
17-
secrets:
18-
eventstore_cloud_id: ${{ secrets.EVENTSTORE_CLOUD_ID }}
19-
tailscale_auth: ${{ secrets.TAILSCALE_AUTH }}

Diff for: .github/workflows/tests.yml

+6-31
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ on:
66
version:
77
required: true
88
type: string
9-
secrets:
10-
eventstore_cloud_id:
11-
required: false
12-
tailscale_auth:
13-
required: false
149

1510
jobs:
1611
build-and-test:
@@ -21,11 +16,9 @@ jobs:
2116
group:
2217
- name: samples
2318
path: ./src/samples
24-
tailscale: true
2519

2620
- name: connection
2721
path: ./src/connection
28-
tailscale: true
2922

3023
- name: extra
3124
path: ./src/extra
@@ -41,45 +34,27 @@ jobs:
4134

4235
- name: opentelemetry
4336
path: ./src/opentelemetry
44-
env:
45-
# GitHub only passes secrets to the main repo, so we need to skip some things if they are unavailable
46-
SECRETS_AVAILABLE: ${{ secrets.eventstore_cloud_id != null }}
4737
runs-on: ubuntu-latest
4838
steps:
4939
- uses: actions/checkout@v4
50-
- name: Connect to tailscale
51-
if: ${{ matrix.group.tailscale && env.SECRETS_AVAILABLE == 'true' }}
52-
run: |
53-
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/eoan.gpg | sudo apt-key add -
54-
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/eoan.list | sudo tee /etc/apt/sources.list.d/tailscale.list
55-
sudo apt-get update
56-
sudo apt-get install tailscale
57-
sudo tailscale up --authkey ${{ secrets.tailscale_auth }} --hostname "node-client-ci-${{ inputs.version }}-$(date +'%Y-%m-%d-%H-%M-%S')" --advertise-tags=tag:ci --accept-routes
58-
59-
- uses: pnpm/action-setup@v4
60-
with:
61-
version: 9.15.0
6240

6341
- uses: actions/setup-node@v4
6442
with:
6543
node-version-file: .github/files/.nvmrc
66-
cache: 'pnpm'
6744

6845
- name: NodeJS version
6946
run: node -v
7047

48+
- name: Corepack
49+
run: corepack enable
50+
7151
- name: Install
72-
run: pnpm install
52+
run: yarn
7353

7454
- name: Build
75-
run: pnpm run build
55+
run: yarn build
7656

7757
- name: Run Tests
78-
run: pnpm run test ${{ matrix.group.path }} --ci --run-in-band --forceExit
58+
run: yarn test ${{ matrix.group.path }} --ci --run-in-band --forceExit
7959
env:
8060
KURRENT_IMAGE: eventstore-ce:${{ inputs.version }}
81-
EVENTSTORE_CLOUD_ID: ${{ secrets.eventstore_cloud_id }}
82-
83-
- name: Disconnect from tailscale
84-
if: ${{ always() && matrix.group.tailscale && env.SECRETS_AVAILABLE == 'true' }}
85-
run: sudo tailscale down

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"prettier:fix": "prettier --write \"packages/*/src/**/**/!(*.d).{ts,json}\"",
1414
"clean": "nx run-many --target=clean",
1515
"prepublishOnly": "yarn clean && yarn build && yarn test",
16-
"test": "nx run @eventstore/test:test"
16+
"test": "nx run test:test"
1717
},
1818
"author": "Event Store Limited",
1919
"license": "Apache-2.0",

Diff for: packages/test/jest.config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ module.exports = {
1010
"^@kurrent/opentelemetry$": "<rootDir>/../opentelemetry/dist/index",
1111
"^@kurrent/opentelemetry/(.*)$": "<rootDir>/../opentelemetry/$1",
1212
},
13-
globals: {
14-
'ts-jest': {
15-
tsconfig: './tsconfig.json',
16-
},
13+
transform: {
14+
'^.+\\.tsx?$': ['ts-jest', {
15+
tsconfig: 'tsconfig.json',
16+
}]
1717
},
1818
};

Diff for: packages/test/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@
4646
"docker-compose": "^0.24.8",
4747
"dotenv": "^16.4.7",
4848
"get-port": "^5.1.1",
49-
"jest": "^27.5.1",
49+
"jest": "^29.7.0",
50+
"jest-environment-node": "^29.7.0",
5051
"shx": "^0.3.4",
51-
"ts-jest": "^27.1.5",
52+
"ts-jest": "^29.2.5",
5253
"uuid": "11.0.3"
5354
}
5455
}

Diff for: packages/test/src/utils/enableVersionCheck.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
/* eslint-disable @typescript-eslint/ban-ts-comment */
22

33
// @ts-ignore
4-
import NodeEnvironment = require("jest-environment-node");
4+
import NodeEnvironment from "jest-environment-node";
55

66
import { Cluster } from "./Cluster";
77
import { KurrentDBClient } from "@kurrent/db-client/dist/index";
88

99
async function extractVersion(this: KurrentDBClient) {
10-
const capabilities = await this.capabilities;
11-
return capabilities;
10+
return await this.capabilities;
1211
}
1312

1413
const checkCapabilities = async () => {

0 commit comments

Comments
 (0)