Skip to content

Commit 2ed2e03

Browse files
authored
Guarantee full spec tests coverage (#4012)
* Ensure all spec tests are run * Fix general bls tests * Improve docs of specTestIterator * Fix fork_choice tests * Remove Check spec tests step
1 parent 52cf6aa commit 2ed2e03

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1577
-1776
lines changed

.github/workflows/test-spec.yml

+4-19
Original file line numberDiff line numberDiff line change
@@ -43,31 +43,16 @@ jobs:
4343
- name: Download spec tests
4444
run: yarn download-spec-tests
4545
working-directory: packages/lodestar
46-
- name: Check spec tests
47-
run: yarn check-spec-tests
48-
working-directory: packages/lodestar
4946

5047
# Run them in different steps to quickly identifying which command failed
5148
# Otherwise just doing `yarn test:spec` you can't tell which specific suite failed
5249
# many of the suites have identical names for minimal and mainnet
5350
- name: Spec tests general
5451
run: yarn test:spec-general
5552
working-directory: packages/lodestar
56-
- name: Spec tests phase0-minimal
57-
run: yarn test:spec-phase0-minimal
58-
working-directory: packages/lodestar
59-
- name: Spec tests phase0-mainnet
60-
run: yarn test:spec-phase0-mainnet
61-
working-directory: packages/lodestar
62-
- name: Spec tests altair-minimal
63-
run: yarn test:spec-altair-minimal
64-
working-directory: packages/lodestar
65-
- name: Spec tests altair-mainnet
66-
run: yarn test:spec-altair-mainnet
67-
working-directory: packages/lodestar
68-
- name: Spec tests bellatrix-minimal
69-
run: yarn test:spec-bellatrix-minimal
53+
- name: Spec tests minimal
54+
run: yarn test:spec-minimal
7055
working-directory: packages/lodestar
71-
- name: Spec tests bellatrix-mainnet
72-
run: yarn test:spec-bellatrix-mainnet
56+
- name: Spec tests mainnet
57+
run: yarn test:spec-mainnet
7358
working-directory: packages/lodestar

packages/lodestar/package.json

+4-13
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,10 @@
4444
"test:sim:merge-interop": "mocha 'test/sim/merge-interop.test.ts'",
4545
"download-spec-tests": "node -r ts-node/register test/spec/downloadTests.ts",
4646
"check-spec-tests": "mocha test/spec/checkCoverage.ts",
47-
"test:bls": "mocha 'test/spec/bls/**/*.test.ts'",
48-
"test:ssz-generic": "mocha 'test/spec/ssz/generic/index.test.ts'",
49-
"test:spec-general": "yarn test:bls && yarn test:ssz-generic",
50-
"test:spec": "yarn test:spec-general && yarn test:bls && yarn test:spec-phase0 && yarn test:spec-altair && yarn test:spec-bellatrix",
51-
"test:spec-phase0-minimal": "LODESTAR_PRESET=minimal mocha --config .mocharc.spec.js 'test/spec/phase0/**/*.test.ts'",
52-
"test:spec-phase0-mainnet": "LODESTAR_PRESET=mainnet mocha --config .mocharc.spec.js 'test/spec/phase0/**/*.test.ts'",
53-
"test:spec-altair-minimal": "LODESTAR_PRESET=minimal mocha --config .mocharc.spec.js 'test/spec/altair/**/*.test.ts'",
54-
"test:spec-altair-mainnet": "LODESTAR_PRESET=mainnet mocha --config .mocharc.spec.js 'test/spec/altair/**/*.test.ts'",
55-
"test:spec-bellatrix-minimal": "LODESTAR_PRESET=minimal mocha --config .mocharc.spec.js 'test/spec/bellatrix/**/*.test.ts'",
56-
"test:spec-bellatrix-mainnet": "LODESTAR_PRESET=mainnet mocha --config .mocharc.spec.js 'test/spec/bellatrix/**/*.test.ts'",
57-
"test:spec-phase0": "yarn test:spec-phase0-minimal && yarn test:spec-phase0-mainnet",
58-
"test:spec-altair": "yarn test:spec-altair-minimal && yarn test:spec-altair-mainnet",
59-
"test:spec-bellatrix": "yarn test:spec-bellatrix-minimal && yarn test:spec-bellatrix-mainnet",
47+
"test:spec-general": "mocha --config .mocharc.spec.js 'test/spec/general/**/*.test.ts'",
48+
"test:spec-minimal": "LODESTAR_PRESET=minimal mocha --config .mocharc.spec.js 'test/spec/presets/**/*.test.ts'",
49+
"test:spec-mainnet": "LODESTAR_PRESET=mainnet mocha --config .mocharc.spec.js 'test/spec/presets/**/*.test.ts'",
50+
"test:spec": "yarn test:spec-general && yarn test:spec-minimal && test:spec-mainnet",
6051
"check-readme": "typescript-docs-verifier"
6152
},
6253
"dependencies": {

packages/lodestar/test/spec/allForks/epochProcessing.ts

-67
This file was deleted.

packages/lodestar/test/spec/allForks/fork.ts

-43
This file was deleted.

0 commit comments

Comments
 (0)