Skip to content

Commit a5cedc9

Browse files
authored
Maint: Add Windows and NodeJs 22 to compatiblity test (#30)
1 parent 002d05b commit a5cedc9

File tree

3 files changed

+42
-6
lines changed

3 files changed

+42
-6
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ env:
99
EM_VERSION: 3.1.44
1010
EM_CACHE_FOLDER: 'emsdk-cache'
1111
jobs:
12-
Build_Package:
12+
build:
1313
runs-on: ubuntu-latest
14+
name: Build Package
1415
steps:
1516
- name: Checkout Code
1617
uses: actions/checkout@v4
@@ -39,12 +40,13 @@ jobs:
3940
uses: actions/upload-artifact@v4
4041
with:
4142
path: libxml2-wasm-*.tgz
42-
Node_Compatibility_Test:
43-
needs: Build_Package
43+
compatibility:
44+
needs: build
45+
name: NodeJS/OS Compatibility Test
4446
strategy:
4547
matrix:
46-
node: [16.20.2, 18.19.0, 20.10.0]
47-
os: [ubuntu-latest, macos-latest] # TODO: add windows-latest
48+
node: [16.20.2, 18.20.4, 20.15.1, 22.5.1]
49+
os: [ubuntu-latest, macos-latest, windows-latest]
4850
runs-on: ${{ matrix.os }}
4951
steps:
5052
- name: Checkout Code
@@ -59,5 +61,19 @@ jobs:
5961
uses: actions/download-artifact@v4
6062
- name: Install libxml2-wasm
6163
run: npm install ./artifact/libxml2-wasm-*.tgz
64+
shell: bash
6265
- name: Run Integration Test
6366
run: npm run integ
67+
result:
68+
needs: compatibility
69+
if: ${{ always() }}
70+
runs-on: ubuntu-latest
71+
name: Compatibility Test Result
72+
steps:
73+
- run: exit 1
74+
if: >-
75+
${{
76+
contains(needs.*.result, 'failure')
77+
|| contains(needs.*.result, 'cancelled')
78+
|| contains(needs.*.result, 'skipped')
79+
}}

package-lock.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"link": "npm run bind && npm run dist",
1414
"wasm": "npm run clean && npm run libxml && npm run link",
1515
"unit": "mocha --v8-expose-gc",
16-
"integ": "TS_NODE_PROJECT=tsconfig.integ.json mocha --v8-expose-gc test/crossplatform",
16+
"integ": "cross-env TS_NODE_PROJECT=tsconfig.integ.json mocha --v8-expose-gc test/crossplatform",
1717
"test": "npm run cov && npm run lint",
1818
"cov": "c8 npm run unit",
1919
"build": "npm run wasm && tsc -p tsconfig.prod.json --declaration",
@@ -42,6 +42,7 @@
4242
"c8": "^9.1.0",
4343
"chai": "^5.1.1",
4444
"chai-sorted": "^0.2.0",
45+
"cross-env": "^7.0.3",
4546
"eslint": "^8.57.0",
4647
"eslint-config-airbnb-base": "^15.0.0",
4748
"eslint-config-airbnb-typescript": "^18.0.0",

0 commit comments

Comments
 (0)