Skip to content

Commit 2badace

Browse files
committed
Update CI
1 parent c690383 commit 2badace

File tree

5 files changed

+41
-650
lines changed

5 files changed

+41
-650
lines changed

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ jobs:
1616
node-version: "22.x"
1717
registry-url: https://registry.npmjs.org/
1818
- run: corepack enable # Enable Corepack
19-
- run: yarn install --frozen-lockfile
19+
- run: yarn install --immutable
2020
- run: yarn build:release
21-
- run: npx @changesets/cli publish
21+
- run: npm publish
2222
env:
2323
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/test.yaml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,42 @@ on:
77
pull_request: {}
88

99
jobs:
10+
build:
11+
name: Build WASM
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v5
15+
- name: Install WASM-Pack
16+
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
17+
- uses: actions/setup-node@v6
18+
with:
19+
node-version: "22.x"
20+
- run: corepack enable
21+
- run: yarn install --immutable
22+
- run: yarn build:release
23+
- uses: actions/upload-artifact@v4
24+
with:
25+
name: wasm-build
26+
path: lib/
27+
retention-days: 1
28+
1029
js_test:
11-
name: Run JS tests in NodeJS environment
12-
runs-on: ${{matrix.os}}
30+
name: Test on Node ${{ matrix.node-version }} (${{ matrix.os }})
31+
needs: build
32+
runs-on: ${{ matrix.os }}
1333
strategy:
1434
matrix:
1535
node-version: [22.x, 24.x, 25.x]
1636
os: [ubuntu-latest, macos-latest]
1737
steps:
1838
- uses: actions/checkout@v5
19-
- name: Install WASM-Pack
20-
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
2139
- uses: actions/setup-node@v6
2240
with:
2341
node-version: ${{ matrix.node-version }}
24-
- run: corepack enable # Enable Corepack
25-
- run: yarn install --frozen-lockfile
26-
- run: yarn build:release
42+
- run: corepack enable
43+
- run: yarn install --immutable
44+
- uses: actions/download-artifact@v4
45+
with:
46+
name: wasm-build
47+
path: lib/
2748
- run: yarn test:wasm

jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ module.exports = {
1717
preset: "ts-jest",
1818
roots: ["<rootDir>/tests"],
1919
testEnvironment: "node",
20+
testEnvironmentOptions: {
21+
localStorage: null,
22+
sessionStorage: null,
23+
},
2024
testPathIgnorePatterns: ["/node_modules/", "/output/"],
2125
testRegex: [".spec.ts$"],
2226
moduleFileExtensions: ["ts", "js", "json", "node"],

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"version:release": "yarn version --minor --message \"chore(release): publish\""
3737
},
3838
"devDependencies": {
39-
"@changesets/cli": "2.29.7",
4039
"@commitlint/cli": "^20.1",
4140
"@commitlint/config-conventional": "^20.0",
4241
"@stablelib/benchmark": "^2.0.0",

0 commit comments

Comments
 (0)