diff --git a/.github/workflows/test-slow.yml b/.github/workflows/test-slow.yml new file mode 100644 index 0000000..797bf51 --- /dev/null +++ b/.github/workflows/test-slow.yml @@ -0,0 +1,22 @@ +name: Run slow JS tests +on: + schedule: + - cron: '0 12 * * *' + workflow_dispatch: +jobs: + big: + name: Test large inputs + runs-on: ubuntu-latest + env: + MSHOULD_FAST: '' + steps: + - uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 + - name: Use Node.js ${{ matrix.node }} + uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 + with: + node-version: ${{ matrix.node }} + registry-url: 'https://registry.npmjs.org' + cache: npm + - run: npm install + - run: npm run build --if-present + - run: npm run test:big diff --git a/test/crosstest.test.js b/test/crosstest.test.js index 87feb21..e58c343 100644 --- a/test/crosstest.test.js +++ b/test/crosstest.test.js @@ -1,9 +1,9 @@ +import { describe, should } from 'micro-should'; import { deepStrictEqual } from 'node:assert'; -import { getCiphers, createCipheriv, createDecipheriv } from 'node:crypto'; -import { should, describe } from 'micro-should'; +import { createCipheriv, createDecipheriv, getCiphers } from 'node:crypto'; import * as aes from '../esm/aes.js'; +import { chacha20, chacha20poly1305, xchacha20poly1305 } from '../esm/chacha.js'; import { xsalsa20poly1305 } from '../esm/salsa.js'; -import { chacha20poly1305, xchacha20poly1305, chacha20 } from '../esm/chacha.js'; import { concatBytes } from '../esm/utils.js'; const KB = 1024; @@ -357,5 +357,4 @@ describe('Cross-test (node)', () => { } }); -if (SLOW) process.env.MSHOULD_FAST = '1'; // parallel should.runWhen(import.meta.url);