Skip to content

Commit

Permalink
Guarantee full spec tests coverage (#4012)
Browse files Browse the repository at this point in the history
* Ensure all spec tests are run

* Fix general bls tests

* Improve docs of specTestIterator

* Fix fork_choice tests

* Remove Check spec tests step
  • Loading branch information
dapplion authored May 12, 2022
1 parent 52cf6aa commit 2ed2e03
Show file tree
Hide file tree
Showing 75 changed files with 1,577 additions and 1,776 deletions.
23 changes: 4 additions & 19 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,16 @@ jobs:
- name: Download spec tests
run: yarn download-spec-tests
working-directory: packages/lodestar
- name: Check spec tests
run: yarn check-spec-tests
working-directory: packages/lodestar

# Run them in different steps to quickly identifying which command failed
# Otherwise just doing `yarn test:spec` you can't tell which specific suite failed
# many of the suites have identical names for minimal and mainnet
- name: Spec tests general
run: yarn test:spec-general
working-directory: packages/lodestar
- name: Spec tests phase0-minimal
run: yarn test:spec-phase0-minimal
working-directory: packages/lodestar
- name: Spec tests phase0-mainnet
run: yarn test:spec-phase0-mainnet
working-directory: packages/lodestar
- name: Spec tests altair-minimal
run: yarn test:spec-altair-minimal
working-directory: packages/lodestar
- name: Spec tests altair-mainnet
run: yarn test:spec-altair-mainnet
working-directory: packages/lodestar
- name: Spec tests bellatrix-minimal
run: yarn test:spec-bellatrix-minimal
- name: Spec tests minimal
run: yarn test:spec-minimal
working-directory: packages/lodestar
- name: Spec tests bellatrix-mainnet
run: yarn test:spec-bellatrix-mainnet
- name: Spec tests mainnet
run: yarn test:spec-mainnet
working-directory: packages/lodestar
17 changes: 4 additions & 13 deletions packages/lodestar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,10 @@
"test:sim:merge-interop": "mocha 'test/sim/merge-interop.test.ts'",
"download-spec-tests": "node -r ts-node/register test/spec/downloadTests.ts",
"check-spec-tests": "mocha test/spec/checkCoverage.ts",
"test:bls": "mocha 'test/spec/bls/**/*.test.ts'",
"test:ssz-generic": "mocha 'test/spec/ssz/generic/index.test.ts'",
"test:spec-general": "yarn test:bls && yarn test:ssz-generic",
"test:spec": "yarn test:spec-general && yarn test:bls && yarn test:spec-phase0 && yarn test:spec-altair && yarn test:spec-bellatrix",
"test:spec-phase0-minimal": "LODESTAR_PRESET=minimal mocha --config .mocharc.spec.js 'test/spec/phase0/**/*.test.ts'",
"test:spec-phase0-mainnet": "LODESTAR_PRESET=mainnet mocha --config .mocharc.spec.js 'test/spec/phase0/**/*.test.ts'",
"test:spec-altair-minimal": "LODESTAR_PRESET=minimal mocha --config .mocharc.spec.js 'test/spec/altair/**/*.test.ts'",
"test:spec-altair-mainnet": "LODESTAR_PRESET=mainnet mocha --config .mocharc.spec.js 'test/spec/altair/**/*.test.ts'",
"test:spec-bellatrix-minimal": "LODESTAR_PRESET=minimal mocha --config .mocharc.spec.js 'test/spec/bellatrix/**/*.test.ts'",
"test:spec-bellatrix-mainnet": "LODESTAR_PRESET=mainnet mocha --config .mocharc.spec.js 'test/spec/bellatrix/**/*.test.ts'",
"test:spec-phase0": "yarn test:spec-phase0-minimal && yarn test:spec-phase0-mainnet",
"test:spec-altair": "yarn test:spec-altair-minimal && yarn test:spec-altair-mainnet",
"test:spec-bellatrix": "yarn test:spec-bellatrix-minimal && yarn test:spec-bellatrix-mainnet",
"test:spec-general": "mocha --config .mocharc.spec.js 'test/spec/general/**/*.test.ts'",
"test:spec-minimal": "LODESTAR_PRESET=minimal mocha --config .mocharc.spec.js 'test/spec/presets/**/*.test.ts'",
"test:spec-mainnet": "LODESTAR_PRESET=mainnet mocha --config .mocharc.spec.js 'test/spec/presets/**/*.test.ts'",
"test:spec": "yarn test:spec-general && yarn test:spec-minimal && test:spec-mainnet",
"check-readme": "typescript-docs-verifier"
},
"dependencies": {
Expand Down
67 changes: 0 additions & 67 deletions packages/lodestar/test/spec/allForks/epochProcessing.ts

This file was deleted.

43 changes: 0 additions & 43 deletions packages/lodestar/test/spec/allForks/fork.ts

This file was deleted.

Loading

0 comments on commit 2ed2e03

Please sign in to comment.