diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 452832a..dc65cbe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,28 +14,10 @@ jobs: uses: haraka/.github/.github/workflows/coverage.yml@master secrets: inherit - test: - needs: [ lint, get-lts ] - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ ubuntu-latest, windows-latest ] - node-version: ${{ fromJson(needs.get-lts.outputs.active) }} - fail-fast: false - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - name: Node ${{ matrix.node-version }} on ${{ matrix.os }} - with: - node-version: ${{ matrix.node-version }} - - run: npm install - - run: npm test + ubuntu: + needs: [ lint ] + uses: haraka/.github/.github/workflows/ubuntu.yml@master - get-lts: - runs-on: ubuntu-latest - steps: - - id: get - uses: msimerson/node-lts-versions@v1 - outputs: - active: ${{ steps.get.outputs.active }} - lts: ${{ steps.get.outputs.lts }} + windows: + needs: [ lint ] + uses: haraka/.github/.github/workflows/windows.yml@master diff --git a/.release b/.release index 1db5e30..029586b 160000 --- a/.release +++ b/.release @@ -1 +1 @@ -Subproject commit 1db5e30154db50a9d355ef711bf87a07dfe79bf1 +Subproject commit 029586bf3a8693bd8f46fd441e05ba1596578d3a diff --git a/Changes.md b/Changes.md index b6f322b..208c6a8 100644 --- a/Changes.md +++ b/Changes.md @@ -1,6 +1,11 @@ ### Unreleased +### [1.2.1] - 2022-07-07 + +- ci: use windows & ubuntu workflows in haraka/.github + + ### [1.2.0] - 2022-06-27 - dep: replace message-stream with email-message @@ -169,3 +174,4 @@ [1.0.35]: https://github.com/haraka/haraka-test-fixtures/releases/tag/1.0.35 [1.1.0]: https://github.com/haraka/haraka-test-fixtures/releases/tag/1.1.0 [1.2.0]: https://github.com/haraka/test-fixtures/releases/tag/1.2.0 +[1.2.1]: https://github.com/haraka/test-fixtures/releases/tag/1.2.1 diff --git a/lib/plugin.js b/lib/plugin.js index b35b9b4..8193cd6 100644 --- a/lib/plugin.js +++ b/lib/plugin.js @@ -146,7 +146,7 @@ class Plugin { } try { - return '"use strict";' + fs.readFileSync(pi_path); + return `"use strict";${fs.readFileSync(pi_path)}`; } catch (err) { throw `Loading plugin ${this.name} failed: ${err}`; @@ -198,7 +198,7 @@ class Plugin { } haraka_require (name) { - return require('./' + name); + return require(`./${name}`); } } diff --git a/lib/util_hmailitem.js b/lib/util_hmailitem.js index ad1fd92..89b5204 100644 --- a/lib/util_hmailitem.js +++ b/lib/util_hmailitem.js @@ -124,7 +124,7 @@ exports.playTestSmtpConversation = function (hmail, socket, test, playbook, call test.ok(expected.test(line), expected.description || `Expected that line works with func: ${expected.test}`); } else { - test.equals(expected.test + '\r\n', line, expected.description || `Expected that line equals: ${expected.test}`); + test.equals(`${expected.test}\r\n`, line, expected.description || `Expected that line equals: ${expected.test}`); } if (expected.end_test === true) { setTimeout(function () { @@ -136,7 +136,7 @@ exports.playTestSmtpConversation = function (hmail, socket, test, playbook, call setTimeout(function () { let nextMessageFromServer; while (false != (nextMessageFromServer = getNextEntryFromPlaybook('remote', playbook))) { - socket.emit('line', nextMessageFromServer.line + '\r\n'); + socket.emit('line', `${nextMessageFromServer.line}\r\n`); } }, 0); } diff --git a/lib/vm_harness.js b/lib/vm_harness.js index 9b48f3c..70a45f3 100644 --- a/lib/vm_harness.js +++ b/lib/vm_harness.js @@ -4,8 +4,8 @@ const vm = require('vm'); /* eslint no-path-concat: "off" */ const dir_paths = [ - __dirname + '/../../../', // for Haraka/tests/plugins - __dirname + '/', // for haraka-test-fixtures/test + `${__dirname}/../../../`, // for Haraka/tests/plugins + `${__dirname}/`, // for haraka-test-fixtures/test ]; function dot_files (element) { @@ -14,7 +14,7 @@ function dot_files (element) { function find_haraka_lib (id) { for (let i = 0; i < dir_paths.length; i++) { - const dirPath = dir_paths[i] + id + `.js`; + const dirPath = `${dir_paths[i]}${id}.js`; // console.log('dirPath: ' + dirPath); try { const stats = fs.statSync(dirPath); diff --git a/package.json b/package.json index 778b013..a607384 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "name": "haraka-test-fixtures", "license": "MIT", "description": "Haraka Test Fixtures", - "version": "1.2.0", + "version": "1.2.1", "repository": { "type": "git", "url": "git@github.com:haraka/test-fixtures.git"