Skip to content

Commit a08c621

Browse files
authored
add test to github workflow (#113)
* add test to github workflow * Add readme, drop node 18 support
1 parent f1a8e0e commit a08c621

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

Diff for: .github/workflows/test.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build and Test
2+
3+
on:
4+
merge_group:
5+
workflow_dispatch:
6+
pull_request:
7+
types:
8+
- opened
9+
- synchronize
10+
push:
11+
branches:
12+
- master
13+
14+
permissions:
15+
contents: read
16+
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
19+
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
20+
21+
jobs:
22+
build:
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
node: [ 12, 14, 16 ]
27+
name: Node ${{ matrix.node }} Test
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v4
31+
with:
32+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
33+
34+
- name: Setup Node
35+
uses: actions/setup-node@v4
36+
with:
37+
node-version: ${{ matrix.node }}
38+
cache: 'npm'
39+
40+
- name: Install dependencies
41+
run: npm ci
42+
43+
- name: Run Mocha unit tests
44+
run: npm run test
45+

Diff for: README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
W3C XML Encryption implementation for node.js (http://www.w3.org/TR/xmlenc-core/)
44

5-
Supports node >= 12
5+
Supports node >= 12 < 18
6+
7+
node 18 not supported due to https://github.com/nodejs/node/issues/52017 for Triple DES algorithms.
68

79
## Usage
810

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
"test": "mocha"
3333
},
3434
"engines": {
35-
"node": ">=12"
35+
"node": ">=12 < 18"
3636
}
3737
}

0 commit comments

Comments
 (0)