66 lines (61 loc) 路 2.22 KB
/
test-spec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Spec tests
on:
push:
branches:
- stable
- unstable
pull_request:
branches:
- stable
- unstable
jobs:
tests-spec:
name: Spec tests
runs-on: ubuntu-latest
steps:
# As of October 2020, runner has +8GB of free space w/out this script (takes 1m30s to run)
# - run: ./scripts/free-disk-space.sh
# <common-build> - Uses YAML anchors in the future
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "lts/gallium"
- name: Node.js version
id: node
run: echo "::set-output name=v8CppApiVersion::$(node --print "process.versions.modules")"
- name: Restore dependencies
uses: actions/cache@master
id: cache-deps
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-${{ steps.node.outputs.v8CppApiVersion }}-${{ hashFiles('**/yarn.lock', '**/package.json') }}
- name: Install & build
if: steps.cache-deps.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --ignore-optional && yarn build
- name: Build
run: yarn build
if: steps.cache-deps.outputs.cache-hit == 'true'
# </common-build>
# Download spec tests with cache
- name: Restore spec tests cache
uses: actions/cache@master
with:
path: packages/beacon-node/spec-tests
key: spec-test-data-${{ hashFiles('packages/beacon-node/test/spec/specTestVersioning.ts') }}
- name: Download spec tests
run: yarn download-spec-tests
working-directory: packages/beacon-node
# 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/beacon-node
- name: Spec tests minimal
run: yarn test:spec-minimal
working-directory: packages/beacon-node
- name: Spec tests mainnet
run: yarn test:spec-mainnet
working-directory: packages/beacon-node