Skip to content

Commit 8b21218

Browse files
committed
Fix test commandline options and improve test options
1 parent 2e4d709 commit 8b21218

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

.github/workflows/gh-pages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
- name: Prepare ONNX
2929
run: npm run create-onnx -t
3030
- name: Test lib
31-
run: npm run test:lib --bail
31+
run: npm run test:lib -- --bail 1
3232
- name: Coveralls
3333
uses: coverallsapp/github-action@master
3434
with:
3535
github-token: ${{ secrets.GITHUB_TOKEN }}
36-
file: coverage/clover.xml
36+
files: coverage/clover.xml
3737
continue-on-error: true
3838
test-js:
3939
runs-on: ubuntu-latest

.github/workflows/npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Prepare ONNX
1616
run: npm run create-onnx -t
1717
- name: Test
18-
run: npm run test:lib --bail
18+
run: npm run test:lib -- --bail 1
1919
publish:
2020
runs-on: ubuntu-latest
2121
needs: test

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
- name: Prepare ONNX
1414
run: npm run create-onnx -t
1515
- name: Test lib
16-
run: npm run test:lib --bail
16+
run: npm run test:lib -- --bail 1
1717
- name: Coveralls
1818
uses: coverallsapp/github-action@master
1919
with:
2020
github-token: ${{ secrets.GITHUB_TOKEN }}
21-
file: coverage/clover.xml
21+
files: coverage/clover.xml
2222
continue-on-error: true
2323
test-js:
2424
runs-on: ubuntu-latest

tests/lib/model/kernelized_perceptron.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { accuracy } from '../../../lib/evaluate/classification.js'
66
describe('classification', () => {
77
test.each([undefined, 'gaussian', { name: 'gaussian', s: 0.8 }, 'polynomial', { name: 'polynomial', d: 3 }])(
88
'kernel %s',
9-
{ retry: 10 },
9+
{ retry: 20 },
1010
kernel => {
1111
const model = new KernelizedPerceptron(1, kernel)
1212
const x = Matrix.concat(Matrix.randn(50, 2, 0, 0.2), Matrix.randn(50, 2, 5, 0.2)).toArray()

tests/lib/model/lmclus.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import LMCLUS from '../../../lib/model/lmclus.js'
33

44
import { randIndex } from '../../../lib/evaluate/clustering.js'
55

6-
test('clustering', { retry: 5 }, () => {
6+
test('clustering', { retry: 10 }, () => {
77
const model = new LMCLUS(5, 1.5, 0.4)
88
const n = 50
99
const x = Matrix.concat(

tests/lib/model/nns/layer/graph_sage.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ describe('nn', () => {
255255
}
256256
})
257257

258-
test('grad decay', () => {
258+
test('grad decay', { timeout: 10000 }, () => {
259259
const net = NeuralNetwork.fromObject(
260260
[{ type: 'input' }, { type: 'graph_sage', out_size: 3, l2_decay: 0.001 }, { type: 'readout' }],
261261
'mse',

tests/lib/model/nns/optimizer/rmsprop.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('rmsprop', () => {
6969
})
7070
})
7171

72-
test('nn', { retry: 3 }, () => {
72+
test('nn', { retry: 5 }, () => {
7373
const net = NeuralNetwork.fromObject(
7474
[
7575
{ type: 'input', name: 'in' },

tests/lib/model/polynomial_histogram.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ describe('density estimation', () => {
3333
expect(corr).toBeGreaterThan(0.1)
3434
})
3535

36-
test.each([0, 2, undefined])('%j', p => {
36+
test.each([0, 2, undefined])('%j', { retry: 3 }, p => {
3737
const model = new PolynomialHistogram(p, 2)
3838
const n = 500
3939
const x = Matrix.concat(Matrix.randn(n, 2, 0, 0.1), Matrix.randn(n, 2, 5, 0.1)).toArray()

0 commit comments

Comments
 (0)