Skip to content

Commit

Permalink
ci: Add slow test
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Jan 17, 2025
1 parent 97b5916 commit c5daa85
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test-slow.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 3 additions & 4 deletions test/crosstest.test.js
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -357,5 +357,4 @@ describe('Cross-test (node)', () => {
}
});

if (SLOW) process.env.MSHOULD_FAST = '1'; // parallel
should.runWhen(import.meta.url);

0 comments on commit c5daa85

Please sign in to comment.