mirror of
https://github.com/logos-messaging/js-waku.git
synced 2026-01-04 06:43:12 +00:00
chore: allure test reporting (#1668)
* allure test reporting * make reports only for the main job * fail a test for demo * fail a test for demo * revert * fail a test for demo * revert * deploy to allure-jswaku * use PAT * add pat as secret * check if pat exists * debug secrets issue * remove debug steps * debug1 * debug2 * debug3 * debug4 * set reports for all tests * fix after ci run * self review --------- Co-authored-by: Sasha <118575614+weboko@users.noreply.github.com>
This commit is contained in:
parent
491366bd4f
commit
80a33b9c2b
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -70,9 +70,11 @@ jobs:
|
|||||||
|
|
||||||
node:
|
node:
|
||||||
uses: ./.github/workflows/test-node.yml
|
uses: ./.github/workflows/test-node.yml
|
||||||
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
nim_wakunode_image: ${{ inputs.nim_wakunode_image || 'wakuorg/nwaku:v0.21.0' }}
|
nim_wakunode_image: ${{ inputs.nim_wakunode_image || 'wakuorg/nwaku:v0.21.0' }}
|
||||||
test_type: node
|
test_type: node
|
||||||
|
allure_reports: true
|
||||||
|
|
||||||
node_optional:
|
node_optional:
|
||||||
uses: ./.github/workflows/test-node.yml
|
uses: ./.github/workflows/test-node.yml
|
||||||
|
|||||||
39
.github/workflows/test-node.yml
vendored
39
.github/workflows/test-node.yml
vendored
@ -18,18 +18,24 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
default: ''
|
default: ''
|
||||||
|
allure_reports:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_JS: "18"
|
NODE_JS: "18"
|
||||||
# Ensure test type conditions remain consistent.
|
# Ensure test type conditions remain consistent.
|
||||||
WAKU_SERVICE_NODE_PARAMS: ${{ (inputs.test_type == 'go-waku-master') && '--min-relay-peers-to-publish=0' || '' }}
|
WAKU_SERVICE_NODE_PARAMS: ${{ (inputs.test_type == 'go-waku-master') && '--min-relay-peers-to-publish=0' || '' }}
|
||||||
DEBUG: ${{ inputs.debug }}
|
DEBUG: ${{ inputs.debug }}
|
||||||
|
GITHUB_TOKEN: ${{ secrets.DEPLOY_TEST_REPORTS_PAT }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
node:
|
node:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
WAKUNODE_IMAGE: ${{ inputs.nim_wakunode_image }}
|
WAKUNODE_IMAGE: ${{ inputs.nim_wakunode_image }}
|
||||||
|
ALLURE_REPORTS: ${{ inputs.allure_reports }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
@ -45,6 +51,39 @@ jobs:
|
|||||||
|
|
||||||
- run: ${{ (inputs.test_type == 'node-optional') && 'npm run test:optional --workspace=@waku/tests' || 'npm run test:node' }}
|
- run: ${{ (inputs.test_type == 'node-optional') && 'npm run test:optional --workspace=@waku/tests' || 'npm run test:node' }}
|
||||||
|
|
||||||
|
- name: Merge allure reports
|
||||||
|
if: always() && env.ALLURE_REPORTS == 'true'
|
||||||
|
run: node ci/mergeAllureResults.cjs
|
||||||
|
|
||||||
|
- name: Get allure history
|
||||||
|
if: always() && env.ALLURE_REPORTS == 'true'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
continue-on-error: true
|
||||||
|
with:
|
||||||
|
repository: waku-org/allure-jswaku
|
||||||
|
ref: gh-pages
|
||||||
|
path: gh-pages
|
||||||
|
token: ${{ env.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setup allure report
|
||||||
|
if: always() && env.ALLURE_REPORTS == 'true'
|
||||||
|
uses: simple-elf/allure-report-action@master
|
||||||
|
id: allure-report
|
||||||
|
with:
|
||||||
|
allure_results: allure-results
|
||||||
|
gh_pages: gh-pages
|
||||||
|
allure_history: allure-history
|
||||||
|
keep_reports: 30
|
||||||
|
|
||||||
|
- name: Deploy report to Github Pages
|
||||||
|
if: always() && env.ALLURE_REPORTS == 'true'
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
with:
|
||||||
|
personal_token: ${{ env.GITHUB_TOKEN }}
|
||||||
|
external_repository: waku-org/allure-jswaku
|
||||||
|
publish_branch: gh-pages
|
||||||
|
publish_dir: allure-history
|
||||||
|
|
||||||
- name: Upload debug logs on failure
|
- name: Upload debug logs on failure
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
if: failure()
|
if: failure()
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ docs
|
|||||||
test-results
|
test-results
|
||||||
playwright-report
|
playwright-report
|
||||||
example
|
example
|
||||||
|
allure-results
|
||||||
|
|||||||
19
ci/mergeAllureResults.cjs
Normal file
19
ci/mergeAllureResults.cjs
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
const fs = require("fs-extra");
|
||||||
|
const glob = require("glob");
|
||||||
|
|
||||||
|
const ROOT_ALLURE_RESULTS = "./allure-results"; // Target directory in the root
|
||||||
|
|
||||||
|
fs.ensureDirSync(ROOT_ALLURE_RESULTS);
|
||||||
|
|
||||||
|
const directories = glob.sync("packages/**/allure-results");
|
||||||
|
|
||||||
|
directories.forEach((dir) => {
|
||||||
|
const files = fs.readdirSync(dir);
|
||||||
|
files.forEach((file) => {
|
||||||
|
const sourcePath = `${dir}/${file}`;
|
||||||
|
const targetPath = `${ROOT_ALLURE_RESULTS}/${file}`;
|
||||||
|
fs.copyFileSync(sourcePath, targetPath);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("All allure-results directories merged successfully!");
|
||||||
125
package-lock.json
generated
125
package-lock.json
generated
@ -3980,9 +3980,9 @@
|
|||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
"node_modules/@types/lodash": {
|
"node_modules/@types/lodash": {
|
||||||
"version": "4.14.199",
|
"version": "4.14.200",
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.200.tgz",
|
||||||
"integrity": "sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==",
|
"integrity": "sha512-YI/M/4HRImtNf3pJgbF+W6FrXovqj+T+/HpENLTooK9PnkacBsDpeP3IpHab40CClUfhNmdM2WTNP2sa2dni5Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/markdown-it": {
|
"node_modules/@types/markdown-it": {
|
||||||
@ -5525,6 +5525,36 @@
|
|||||||
"ajv": "^6.9.1"
|
"ajv": "^6.9.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/allure-commandline": {
|
||||||
|
"version": "2.24.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/allure-commandline/-/allure-commandline-2.24.1.tgz",
|
||||||
|
"integrity": "sha512-eNto3ipBq+O2B/f8/OwiS3E8R7jYENs3qv8jT7wMZmziYLANsISC9tX/FfEqR3FDiQlEOjkP7iyTEZ3ph53FPg==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"allure": "bin/allure"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/allure-js-commons": {
|
||||||
|
"version": "2.9.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/allure-js-commons/-/allure-js-commons-2.9.2.tgz",
|
||||||
|
"integrity": "sha512-Qvi+zMZQruklqcnqG/zHCnE209v1YiWGhO3H2aPW2aXC8Ockqd01a+w2lP4Qqp3SfC+WQDeAK2+pp+v+eNl8xQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"properties": "^1.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/allure-mocha": {
|
||||||
|
"version": "2.9.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/allure-mocha/-/allure-mocha-2.9.2.tgz",
|
||||||
|
"integrity": "sha512-JOWvqn6534VfrfGhOtjBtGUMMO3+zKKujay5dnfbWncGlIQK9c+qrDPvbTupBc9uIvIFT5EjSAtTYKPAAWz5EQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"allure-js-commons": "2.9.2"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"mocha": ">=6.2.x"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/ansi-align": {
|
"node_modules/ansi-align": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
@ -10213,7 +10243,8 @@
|
|||||||
},
|
},
|
||||||
"node_modules/fast-deep-equal": {
|
"node_modules/fast-deep-equal": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"license": "MIT"
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
|
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||||
},
|
},
|
||||||
"node_modules/fast-diff": {
|
"node_modules/fast-diff": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
@ -15035,7 +15066,8 @@
|
|||||||
},
|
},
|
||||||
"node_modules/mocha": {
|
"node_modules/mocha": {
|
||||||
"version": "10.2.0",
|
"version": "10.2.0",
|
||||||
"license": "MIT",
|
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz",
|
||||||
|
"integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ansi-colors": "4.1.1",
|
"ansi-colors": "4.1.1",
|
||||||
"browser-stdout": "1.3.1",
|
"browser-stdout": "1.3.1",
|
||||||
@ -15071,6 +15103,22 @@
|
|||||||
"url": "https://opencollective.com/mochajs"
|
"url": "https://opencollective.com/mochajs"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/mocha-multi-reporters": {
|
||||||
|
"version": "1.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/mocha-multi-reporters/-/mocha-multi-reporters-1.5.1.tgz",
|
||||||
|
"integrity": "sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"debug": "^4.1.1",
|
||||||
|
"lodash": "^4.17.15"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"mocha": ">=3.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/mocha/node_modules/ansi-colors": {
|
"node_modules/mocha/node_modules/ansi-colors": {
|
||||||
"version": "4.1.1",
|
"version": "4.1.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -20901,6 +20949,15 @@
|
|||||||
"node": ">= 4"
|
"node": ">= 4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/properties": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/properties/-/properties-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-qYNxyMj1JeW54i/EWEFsM1cVwxJbtgPp8+0Wg9XjNaK6VE/c4oRi6PNu5p7w1mNXEIQIjV5Wwn8v8Gz82/QzdQ==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/proto-list": {
|
"node_modules/proto-list": {
|
||||||
"version": "1.2.4",
|
"version": "1.2.4",
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
@ -26204,6 +26261,8 @@
|
|||||||
"@waku/message-encryption": "*",
|
"@waku/message-encryption": "*",
|
||||||
"@waku/peer-exchange": "*",
|
"@waku/peer-exchange": "*",
|
||||||
"@waku/sdk": "*",
|
"@waku/sdk": "*",
|
||||||
|
"allure-commandline": "^2.24.1",
|
||||||
|
"allure-mocha": "^2.9.2",
|
||||||
"chai": "^4.3.7",
|
"chai": "^4.3.7",
|
||||||
"cspell": "^7.3.2",
|
"cspell": "^7.3.2",
|
||||||
"datastore-core": "^9.2.3",
|
"datastore-core": "^9.2.3",
|
||||||
@ -26211,6 +26270,7 @@
|
|||||||
"interface-datastore": "^8.2.5",
|
"interface-datastore": "^8.2.5",
|
||||||
"libp2p": "^0.46.14",
|
"libp2p": "^0.46.14",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
|
"mocha-multi-reporters": "^1.5.1",
|
||||||
"npm-run-all": "^4.1.5"
|
"npm-run-all": "^4.1.5"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@ -28786,9 +28846,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/lodash": {
|
"@types/lodash": {
|
||||||
"version": "4.14.199",
|
"version": "4.14.200",
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.199.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.200.tgz",
|
||||||
"integrity": "sha512-Vrjz5N5Ia4SEzWWgIVwnHNEnb1UE1XMkvY5DGXrAeOGE9imk0hgTHh5GyDjLDJi9OTCn9oo9dXH1uToK1VRfrg==",
|
"integrity": "sha512-YI/M/4HRImtNf3pJgbF+W6FrXovqj+T+/HpENLTooK9PnkacBsDpeP3IpHab40CClUfhNmdM2WTNP2sa2dni5Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"@types/markdown-it": {
|
"@types/markdown-it": {
|
||||||
@ -29474,6 +29534,8 @@
|
|||||||
"@waku/peer-exchange": "*",
|
"@waku/peer-exchange": "*",
|
||||||
"@waku/sdk": "*",
|
"@waku/sdk": "*",
|
||||||
"@waku/utils": "*",
|
"@waku/utils": "*",
|
||||||
|
"allure-commandline": "^2.24.1",
|
||||||
|
"allure-mocha": "^2.9.2",
|
||||||
"app-root-path": "^3.1.0",
|
"app-root-path": "^3.1.0",
|
||||||
"chai": "^4.3.7",
|
"chai": "^4.3.7",
|
||||||
"chai-as-promised": "^7.1.1",
|
"chai-as-promised": "^7.1.1",
|
||||||
@ -29485,6 +29547,7 @@
|
|||||||
"libp2p": "^0.46.14",
|
"libp2p": "^0.46.14",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
|
"mocha-multi-reporters": "^1.5.1",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"p-retry": "^6.1.0",
|
"p-retry": "^6.1.0",
|
||||||
"p-timeout": "^6.1.0",
|
"p-timeout": "^6.1.0",
|
||||||
@ -30018,6 +30081,30 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
|
"allure-commandline": {
|
||||||
|
"version": "2.24.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/allure-commandline/-/allure-commandline-2.24.1.tgz",
|
||||||
|
"integrity": "sha512-eNto3ipBq+O2B/f8/OwiS3E8R7jYENs3qv8jT7wMZmziYLANsISC9tX/FfEqR3FDiQlEOjkP7iyTEZ3ph53FPg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"allure-js-commons": {
|
||||||
|
"version": "2.9.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/allure-js-commons/-/allure-js-commons-2.9.2.tgz",
|
||||||
|
"integrity": "sha512-Qvi+zMZQruklqcnqG/zHCnE209v1YiWGhO3H2aPW2aXC8Ockqd01a+w2lP4Qqp3SfC+WQDeAK2+pp+v+eNl8xQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"properties": "^1.2.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"allure-mocha": {
|
||||||
|
"version": "2.9.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/allure-mocha/-/allure-mocha-2.9.2.tgz",
|
||||||
|
"integrity": "sha512-JOWvqn6534VfrfGhOtjBtGUMMO3+zKKujay5dnfbWncGlIQK9c+qrDPvbTupBc9uIvIFT5EjSAtTYKPAAWz5EQ==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"allure-js-commons": "2.9.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"ansi-align": {
|
"ansi-align": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -32786,7 +32873,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"fast-deep-equal": {
|
"fast-deep-equal": {
|
||||||
"version": "3.1.3"
|
"version": "3.1.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
|
||||||
|
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
|
||||||
},
|
},
|
||||||
"fast-diff": {
|
"fast-diff": {
|
||||||
"version": "1.3.0",
|
"version": "1.3.0",
|
||||||
@ -35670,6 +35759,8 @@
|
|||||||
},
|
},
|
||||||
"mocha": {
|
"mocha": {
|
||||||
"version": "10.2.0",
|
"version": "10.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz",
|
||||||
|
"integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-colors": "4.1.1",
|
"ansi-colors": "4.1.1",
|
||||||
"browser-stdout": "1.3.1",
|
"browser-stdout": "1.3.1",
|
||||||
@ -35841,6 +35932,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"mocha-multi-reporters": {
|
||||||
|
"version": "1.5.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/mocha-multi-reporters/-/mocha-multi-reporters-1.5.1.tgz",
|
||||||
|
"integrity": "sha512-Yb4QJOaGLIcmB0VY7Wif5AjvLMUFAdV57D2TWEva1Y0kU/3LjKpeRVmlMIfuO1SVbauve459kgtIizADqxMWPg==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"debug": "^4.1.1",
|
||||||
|
"lodash": "^4.17.15"
|
||||||
|
}
|
||||||
|
},
|
||||||
"modify-values": {
|
"modify-values": {
|
||||||
"version": "1.0.1"
|
"version": "1.0.1"
|
||||||
},
|
},
|
||||||
@ -39216,6 +39317,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"properties": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/properties/-/properties-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-qYNxyMj1JeW54i/EWEFsM1cVwxJbtgPp8+0Wg9XjNaK6VE/c4oRi6PNu5p7w1mNXEIQIjV5Wwn8v8Gz82/QzdQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"proto-list": {
|
"proto-list": {
|
||||||
"version": "1.2.4"
|
"version": "1.2.4"
|
||||||
},
|
},
|
||||||
|
|||||||
6
packages/core/.mocha.reporters.json
Normal file
6
packages/core/.mocha.reporters.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"reporterEnabled": "spec, allure-mocha",
|
||||||
|
"allureMochaReporter": {
|
||||||
|
"outputDir": "allure-results"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
packages/core/.mocharc.cjs
Normal file
26
packages/core/.mocharc.cjs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
const config = {
|
||||||
|
extension: ['ts'],
|
||||||
|
spec: 'src/**/*.spec.ts',
|
||||||
|
require: ['ts-node/register', 'isomorphic-fetch'],
|
||||||
|
loader: 'ts-node/esm',
|
||||||
|
nodeOptions: [
|
||||||
|
'experimental-specifier-resolution=node',
|
||||||
|
'loader=ts-node/esm'
|
||||||
|
],
|
||||||
|
exit: true
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.CI) {
|
||||||
|
console.log("Running tests in parallel");
|
||||||
|
config.parallel = true;
|
||||||
|
config.jobs = 6;
|
||||||
|
console.log("Activating allure reporting");
|
||||||
|
config.reporter = 'mocha-multi-reporters';
|
||||||
|
config.reporterOptions = {
|
||||||
|
configFile: '.mocha.reporters.json'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("Running tests serially. To enable parallel execution update mocha config");
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extension": ["ts"],
|
|
||||||
"spec": "src/**/*.spec.ts",
|
|
||||||
"require": ["ts-node/register", "isomorphic-fetch"],
|
|
||||||
"loader": "ts-node/esm",
|
|
||||||
"node-option": [
|
|
||||||
"experimental-specifier-resolution=node",
|
|
||||||
"loader=ts-node/esm"
|
|
||||||
],
|
|
||||||
"exit": true
|
|
||||||
}
|
|
||||||
6
packages/dns-discovery/.mocha.reporters.json
Normal file
6
packages/dns-discovery/.mocha.reporters.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"reporterEnabled": "spec, allure-mocha",
|
||||||
|
"allureMochaReporter": {
|
||||||
|
"outputDir": "allure-results"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
packages/dns-discovery/.mocharc.cjs
Normal file
26
packages/dns-discovery/.mocharc.cjs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
const config = {
|
||||||
|
extension: ['ts'],
|
||||||
|
spec: 'src/**/*.spec.ts',
|
||||||
|
require: ['ts-node/register', 'isomorphic-fetch'],
|
||||||
|
loader: 'ts-node/esm',
|
||||||
|
'node-option': [
|
||||||
|
'experimental-specifier-resolution=node',
|
||||||
|
'loader=ts-node/esm'
|
||||||
|
],
|
||||||
|
exit: true
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.CI) {
|
||||||
|
console.log("Running tests in parallel");
|
||||||
|
config.parallel = true;
|
||||||
|
config.jobs = 6;
|
||||||
|
console.log("Activating allure reporting");
|
||||||
|
config.reporter = 'mocha-multi-reporters';
|
||||||
|
config.reporterOptions = {
|
||||||
|
configFile: '.mocha.reporters.json'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("Running tests serially. To enable parallel execution update mocha config");
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extension": ["ts"],
|
|
||||||
"spec": "src/**/*.spec.ts",
|
|
||||||
"require": ["ts-node/register", "isomorphic-fetch"],
|
|
||||||
"loader": "ts-node/esm",
|
|
||||||
"node-option": [
|
|
||||||
"experimental-specifier-resolution=node",
|
|
||||||
"loader=ts-node/esm"
|
|
||||||
],
|
|
||||||
"exit": true
|
|
||||||
}
|
|
||||||
6
packages/enr/.mocha.reporters.json
Normal file
6
packages/enr/.mocha.reporters.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"reporterEnabled": "spec, allure-mocha",
|
||||||
|
"allureMochaReporter": {
|
||||||
|
"outputDir": "allure-results"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
packages/enr/.mocharc.cjs
Normal file
26
packages/enr/.mocharc.cjs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
const config = {
|
||||||
|
extension: ['ts'],
|
||||||
|
spec: 'src/**/*.spec.ts',
|
||||||
|
require: ['ts-node/register', 'isomorphic-fetch'],
|
||||||
|
loader: 'ts-node/esm',
|
||||||
|
'node-option': [
|
||||||
|
'experimental-specifier-resolution=node',
|
||||||
|
'loader=ts-node/esm'
|
||||||
|
],
|
||||||
|
exit: true
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.CI) {
|
||||||
|
console.log("Running tests in parallel");
|
||||||
|
config.parallel = true;
|
||||||
|
config.jobs = 6;
|
||||||
|
console.log("Activating allure reporting");
|
||||||
|
config.reporter = 'mocha-multi-reporters';
|
||||||
|
config.reporterOptions = {
|
||||||
|
configFile: '.mocha.reporters.json'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("Running tests serially. To enable parallel execution update mocha config");
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extension": ["ts"],
|
|
||||||
"spec": "src/**/*.spec.ts",
|
|
||||||
"require": ["ts-node/register", "isomorphic-fetch"],
|
|
||||||
"loader": "ts-node/esm",
|
|
||||||
"node-option": [
|
|
||||||
"experimental-specifier-resolution=node",
|
|
||||||
"loader=ts-node/esm"
|
|
||||||
],
|
|
||||||
"exit": true
|
|
||||||
}
|
|
||||||
6
packages/message-encryption/.mocha.reporters.json
Normal file
6
packages/message-encryption/.mocha.reporters.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"reporterEnabled": "spec, allure-mocha",
|
||||||
|
"allureMochaReporter": {
|
||||||
|
"outputDir": "allure-results"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
packages/message-encryption/.mocharc.cjs
Normal file
26
packages/message-encryption/.mocharc.cjs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
const config = {
|
||||||
|
extension: ['ts'],
|
||||||
|
spec: 'src/**/*.spec.ts',
|
||||||
|
require: ['ts-node/register', 'isomorphic-fetch'],
|
||||||
|
loader: 'ts-node/esm',
|
||||||
|
'node-option': [
|
||||||
|
'experimental-specifier-resolution=node',
|
||||||
|
'loader=ts-node/esm'
|
||||||
|
],
|
||||||
|
exit: true
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.CI) {
|
||||||
|
console.log("Running tests in parallel");
|
||||||
|
config.parallel = true;
|
||||||
|
config.jobs = 6;
|
||||||
|
console.log("Activating allure reporting");
|
||||||
|
config.reporter = 'mocha-multi-reporters';
|
||||||
|
config.reporterOptions = {
|
||||||
|
configFile: '.mocha.reporters.json'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("Running tests serially. To enable parallel execution update mocha config");
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extension": ["ts"],
|
|
||||||
"spec": "src/**/*.spec.ts",
|
|
||||||
"require": ["ts-node/register", "isomorphic-fetch"],
|
|
||||||
"loader": "ts-node/esm",
|
|
||||||
"node-option": [
|
|
||||||
"experimental-specifier-resolution=node",
|
|
||||||
"loader=ts-node/esm"
|
|
||||||
],
|
|
||||||
"exit": true
|
|
||||||
}
|
|
||||||
@ -6,6 +6,7 @@ import { getPublicKey } from "./crypto/index.js";
|
|||||||
import { createDecoder, createEncoder } from "./ecies.js";
|
import { createDecoder, createEncoder } from "./ecies.js";
|
||||||
|
|
||||||
describe("Ecies Encryption", function () {
|
describe("Ecies Encryption", function () {
|
||||||
|
this.timeout(20000);
|
||||||
it("Round trip binary encryption [ecies, no signature]", async function () {
|
it("Round trip binary encryption [ecies, no signature]", async function () {
|
||||||
await fc.assert(
|
await fc.assert(
|
||||||
fc.asyncProperty(
|
fc.asyncProperty(
|
||||||
|
|||||||
@ -11,7 +11,8 @@ import {
|
|||||||
preCipher
|
preCipher
|
||||||
} from "./waku_payload.js";
|
} from "./waku_payload.js";
|
||||||
|
|
||||||
describe("Waku Payload", () => {
|
describe("Waku Payload", function () {
|
||||||
|
this.timeout(20000);
|
||||||
it("Asymmetric encrypt & decrypt", async function () {
|
it("Asymmetric encrypt & decrypt", async function () {
|
||||||
await fc.assert(
|
await fc.assert(
|
||||||
fc.asyncProperty(
|
fc.asyncProperty(
|
||||||
|
|||||||
6
packages/message-hash/.mocha.reporters.json
Normal file
6
packages/message-hash/.mocha.reporters.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"reporterEnabled": "spec, allure-mocha",
|
||||||
|
"allureMochaReporter": {
|
||||||
|
"outputDir": "allure-results"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
packages/message-hash/.mocharc.cjs
Normal file
26
packages/message-hash/.mocharc.cjs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
const config = {
|
||||||
|
extension: ['ts'],
|
||||||
|
spec: 'src/**/*.spec.ts',
|
||||||
|
require: ['ts-node/register', 'isomorphic-fetch'],
|
||||||
|
loader: 'ts-node/esm',
|
||||||
|
'node-option': [
|
||||||
|
'experimental-specifier-resolution=node',
|
||||||
|
'loader=ts-node/esm'
|
||||||
|
],
|
||||||
|
exit: true
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.CI) {
|
||||||
|
console.log("Running tests in parallel");
|
||||||
|
config.parallel = true;
|
||||||
|
config.jobs = 6;
|
||||||
|
console.log("Activating allure reporting");
|
||||||
|
config.reporter = 'mocha-multi-reporters';
|
||||||
|
config.reporterOptions = {
|
||||||
|
configFile: '.mocha.reporters.json'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("Running tests serially. To enable parallel execution update mocha config");
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extension": ["ts"],
|
|
||||||
"spec": "src/**/*.spec.ts",
|
|
||||||
"require": ["ts-node/register", "isomorphic-fetch"],
|
|
||||||
"loader": "ts-node/esm",
|
|
||||||
"node-option": [
|
|
||||||
"experimental-specifier-resolution=node",
|
|
||||||
"loader=ts-node/esm"
|
|
||||||
],
|
|
||||||
"exit": true
|
|
||||||
}
|
|
||||||
6
packages/relay/.mocha.reporters.json
Normal file
6
packages/relay/.mocha.reporters.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"reporterEnabled": "spec, allure-mocha",
|
||||||
|
"allureMochaReporter": {
|
||||||
|
"outputDir": "allure-results"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
packages/relay/.mocharc.cjs
Normal file
26
packages/relay/.mocharc.cjs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
const config = {
|
||||||
|
extension: ['ts'],
|
||||||
|
spec: 'src/**/*.spec.ts',
|
||||||
|
require: ['ts-node/register', 'isomorphic-fetch'],
|
||||||
|
loader: 'ts-node/esm',
|
||||||
|
'node-option': [
|
||||||
|
'experimental-specifier-resolution=node',
|
||||||
|
'loader=ts-node/esm'
|
||||||
|
],
|
||||||
|
exit: true
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.CI) {
|
||||||
|
console.log("Running tests in parallel");
|
||||||
|
config.parallel = true;
|
||||||
|
config.jobs = 6;
|
||||||
|
console.log("Activating allure reporting");
|
||||||
|
config.reporter = 'mocha-multi-reporters';
|
||||||
|
config.reporterOptions = {
|
||||||
|
configFile: '.mocha.reporters.json'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("Running tests serially. To enable parallel execution update mocha config");
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"extension": ["ts"],
|
|
||||||
"spec": "src/**/*.spec.ts",
|
|
||||||
"require": ["ts-node/register", "isomorphic-fetch"],
|
|
||||||
"loader": "ts-node/esm",
|
|
||||||
"node-option": [
|
|
||||||
"experimental-specifier-resolution=node",
|
|
||||||
"loader=ts-node/esm"
|
|
||||||
],
|
|
||||||
"exit": true
|
|
||||||
}
|
|
||||||
6
packages/tests/.mocha.reporters.json
Normal file
6
packages/tests/.mocha.reporters.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"reporterEnabled": "spec, allure-mocha",
|
||||||
|
"allureMochaReporter": {
|
||||||
|
"outputDir": "allure-results"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
packages/tests/.mocharc.cjs
Normal file
26
packages/tests/.mocharc.cjs
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
const config = {
|
||||||
|
extension: ['ts'],
|
||||||
|
require: ['ts-node/register', 'isomorphic-fetch'],
|
||||||
|
loader: 'ts-node/esm',
|
||||||
|
'node-option': [
|
||||||
|
'experimental-specifier-resolution=node',
|
||||||
|
'loader=ts-node/esm'
|
||||||
|
],
|
||||||
|
exit: true,
|
||||||
|
retries: 4
|
||||||
|
};
|
||||||
|
|
||||||
|
if (process.env.CI) {
|
||||||
|
console.log("Running tests in parallel");
|
||||||
|
config.parallel = true;
|
||||||
|
config.jobs = 6;
|
||||||
|
console.log("Activating allure reporting");
|
||||||
|
config.reporter = 'mocha-multi-reporters';
|
||||||
|
config.reporterOptions = {
|
||||||
|
configFile: '.mocha.reporters.json'
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
console.log("Running tests serially. To enable parallel execution update mocha config");
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = config;
|
||||||
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"extension": ["ts"],
|
|
||||||
"require": ["ts-node/register", "isomorphic-fetch"],
|
|
||||||
"loader": "ts-node/esm",
|
|
||||||
"node-option": [
|
|
||||||
"experimental-specifier-resolution=node",
|
|
||||||
"loader=ts-node/esm"
|
|
||||||
],
|
|
||||||
"exit": true,
|
|
||||||
"retries": 4,
|
|
||||||
"parallel": false,
|
|
||||||
"jobs": 6
|
|
||||||
}
|
|
||||||
@ -79,6 +79,8 @@
|
|||||||
"@waku/message-encryption": "*",
|
"@waku/message-encryption": "*",
|
||||||
"@waku/peer-exchange": "*",
|
"@waku/peer-exchange": "*",
|
||||||
"@waku/sdk": "*",
|
"@waku/sdk": "*",
|
||||||
|
"allure-commandline": "^2.24.1",
|
||||||
|
"allure-mocha": "^2.9.2",
|
||||||
"chai": "^4.3.7",
|
"chai": "^4.3.7",
|
||||||
"cspell": "^7.3.2",
|
"cspell": "^7.3.2",
|
||||||
"datastore-core": "^9.2.3",
|
"datastore-core": "^9.2.3",
|
||||||
@ -86,6 +88,7 @@
|
|||||||
"interface-datastore": "^8.2.5",
|
"interface-datastore": "^8.2.5",
|
||||||
"libp2p": "^0.46.14",
|
"libp2p": "^0.46.14",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
|
"mocha-multi-reporters": "^1.5.1",
|
||||||
"npm-run-all": "^4.1.5"
|
"npm-run-all": "^4.1.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,16 +24,6 @@ async function main() {
|
|||||||
...process.argv.slice(2)
|
...process.argv.slice(2)
|
||||||
];
|
];
|
||||||
|
|
||||||
// If in CI, add --parallel
|
|
||||||
if (process.env.CI) {
|
|
||||||
mochaArgs.push("--parallel");
|
|
||||||
console.log("Running tests in parallel");
|
|
||||||
} else {
|
|
||||||
console.log(
|
|
||||||
"Running tests serially. To enable parallel execution update mocha config"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Run mocha tests
|
// Run mocha tests
|
||||||
const mocha = spawn("npx", mochaArgs, {
|
const mocha = spawn("npx", mochaArgs, {
|
||||||
stdio: "inherit"
|
stdio: "inherit"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user