From dca2e1e43535c91d419a3ad4160eb9a0b7f4902b Mon Sep 17 00:00:00 2001 From: George Wang Date: Thu, 1 Aug 2024 13:55:20 -0700 Subject: [PATCH 1/4] add test to github workflow --- .github/workflows/test.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9c75474 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,44 @@ +name: Build and Test + +on: + merge_group: + workflow_dispatch: + pull_request: + types: + - opened + - synchronize + push: + branches: + - master + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node: [ 12, 14, 16, 18 ] + name: Node ${{ matrix.node }} Test + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: 'npm' + + - name: Install dependencies + run: npm install --build-from-source + + - name: Run Jest unit tests + run: npm run test \ No newline at end of file From f9c6b72c5a382988707efb2af065b965dbc8938d Mon Sep 17 00:00:00 2001 From: George Wang Date: Thu, 1 Aug 2024 13:58:16 -0700 Subject: [PATCH 2/4] fix yaml typo --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c75474..700acf2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: cache: 'npm' - name: Install dependencies - run: npm install --build-from-source + run: npm ci - - name: Run Jest unit tests + - name: Run Mocha unit tests run: npm run test \ No newline at end of file From 7feff9cfb167119553339a49cc9f4e71076de28e Mon Sep 17 00:00:00 2001 From: George Wang Date: Thu, 1 Aug 2024 14:35:40 -0700 Subject: [PATCH 3/4] Add readme, drop node 18 support --- .github/workflows/test.yml | 2 +- README.md | 4 +++- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 700acf2..7289385 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ 12, 14, 16, 18 ] + node: [ 12, 14, 16 ] name: Node ${{ matrix.node }} Test steps: - name: Checkout code diff --git a/README.md b/README.md index 3fa5fb3..9b77964 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ W3C XML Encryption implementation for node.js (http://www.w3.org/TR/xmlenc-core/) -Supports node >= 12 +Supports node >= 12 < 18 + +node 18 not supported due to https://github.com/nodejs/node/issues/52017 for Triple DES algorithms. ## Usage diff --git a/package.json b/package.json index 6743efd..e388f21 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,6 @@ "test": "mocha" }, "engines": { - "node": ">=12" + "node": ">=12 < 18" } } From 96974b0fe193495e62829d3f8f29f57e2c78adf1 Mon Sep 17 00:00:00 2001 From: George Wang Date: Mon, 5 Aug 2024 09:52:00 -0700 Subject: [PATCH 4/4] add newline --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7289385..715d69d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,4 +41,5 @@ jobs: run: npm ci - name: Run Mocha unit tests - run: npm run test \ No newline at end of file + run: npm run test +