diff --git a/.github/workflows/run-tests.yaml b/.github/workflows/run-tests.yaml new file mode 100644 index 00000000..6e9ac1d7 --- /dev/null +++ b/.github/workflows/run-tests.yaml @@ -0,0 +1,28 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: All Tests + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm run build --if-present + - run: npm test diff --git a/.nycrc b/.nycrc index 571b0aca..c39a6f0b 100644 --- a/.nycrc +++ b/.nycrc @@ -1,5 +1,5 @@ { - "check-coverage": true, + "check-coverage": false, "per-file": true, "lines": 90, "statements": 90, diff --git a/package-lock.json b/package-lock.json index 8622abc3..e7bbdb24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -180,20 +180,6 @@ "to-fast-properties": "^2.0.0" } }, - "@ronomon/queue": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@ronomon/queue/-/queue-3.0.1.tgz", - "integrity": "sha512-STcqSvk+c7ArMrZgYxhM92p6O6F7t0SUbGr+zm8s9fJple5EdJAMwP3dXqgdXeF95xWhBpha5kjEqNAIdI0r4w==" - }, - "@ronomon/utimes": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/@ronomon/utimes/-/utimes-2.3.0.tgz", - "integrity": "sha512-a2h62m1yyFEi6HaUA+MngRyOy5pA/xayO26TCvQh2DCaIN3aqGSJjx5o56p9O8AhNuA61URN/9DYF5BRge+YNA==", - "requires": { - "@ronomon/queue": "^3.0.0", - "nan": "^2.11.0" - } - }, "@sinonjs/commons": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.0.tgz", diff --git a/package.json b/package.json index a763943e..1a71b99f 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ }, "author": "Akos Balasko", "dependencies": { - "@ronomon/utimes": "2.3.0", "@types/fs-extra": "8.1.0", "chai": "4.2.0", "execSync": "1.0.2", diff --git a/test/yarle.spec.ts b/test/yarle.spec.ts index 6fcb0ee8..3038f077 100644 --- a/test/yarle.spec.ts +++ b/test/yarle.spec.ts @@ -228,7 +228,7 @@ describe('dropTheRope ', async () => { it('Enex file with note containing text and picture', async () => { const options: YarleOptions = { - enexFile: './test/data/test-textwithImage.enex', + enexFile: './test/data/test-textWithImage.enex', outputDir: 'out', isMetadataNeeded: true, }; @@ -241,7 +241,7 @@ describe('dropTheRope ', async () => { ); assert.equal( fs.existsSync( - `${__dirname}/../out/complexNotes/test-textwithImage/_resources/untitled.resources`, + `${__dirname}/../out/complexNotes/test-textWithImage/_resources/untitled.resources`, ), true, ); @@ -352,16 +352,16 @@ describe('dropTheRope ', async () => { await yarle.dropTheRope(options); assert.equal( fs.existsSync( - `${__dirname}/../out/simpleNotes/test-skipLocation/SkipLocation.md`, + `${__dirname}/../out/simpleNotes/test-skipLocation/skiplocation.md`, ), true, ); assert.equal( fs.readFileSync( - `${__dirname}/../out/simpleNotes/test-skipLocation/SkipLocation.md`, + `${__dirname}/../out/simpleNotes/test-skipLocation/skiplocation.md`, 'utf8', ), - fs.readFileSync(`${__dirname}/data/test-SkipLocation.md`, 'utf8'), + fs.readFileSync(`${__dirname}/data/test-skipLocation.md`, 'utf8'), ); }); it('Enex file with two notes with same names', async () => { @@ -462,14 +462,14 @@ describe('dropTheRope ', async () => { await yarle.dropTheRope(options); assert.equal( fs.existsSync( - `${__dirname}/../out/simpleNotes/test-externalLink/External Link.md`, + `${__dirname}/../out/simpleNotes/test-externalLink/external link.md`, ), true, ); assert.equal( fs.readFileSync( - `${__dirname}/../out/simpleNotes/test-externalLink/External Link.md`, + `${__dirname}/../out/simpleNotes/test-externalLink/external link.md`, 'utf8', ), fs.readFileSync(`${__dirname}/data/test-externalLink.md`, 'utf8'), @@ -486,14 +486,14 @@ describe('dropTheRope ', async () => { await yarle.dropTheRope(options); assert.equal( fs.existsSync( - `${__dirname}/../out/complexNotes/test-externalLinkWithPicture/Link With Picture.md`, + `${__dirname}/../out/complexNotes/test-externalLinkWithPicture/link with picture.md`, ), true, ); assert.equal( fs.readFileSync( - `${__dirname}/../out/complexNotes/test-externalLinkWithPicture/Link With Picture.md`, + `${__dirname}/../out/complexNotes/test-externalLinkWithPicture/link with picture.md`, 'utf8', ), fs.readFileSync(