Repository navigation
128 lines (122 loc) · 3.64 KB
/
Copy pathtest.yml
File metadata and controls
128 lines (122 loc) · 3.64 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Tests
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
node_checks:
name: Node checks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [22, 24]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- run: corepack enable
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: ${{matrix.node}}
cache: pnpm
- name: Bootstrap
run: pnpm i --frozen-lockfile
- name: Build
run: pnpm build
- name: Generate
run: pnpm generate
- name: Check types
run: pnpm check-types
- name: Lint
run: pnpm lint
- name: Lint (no push-spread)
run: pnpm lint:no-push-spread
- name: Unit Tests
run: pnpm test:unit
- name: Browsers Tests
run: pnpm test:browsers
spec_tests:
name: Spec tests (${{ matrix.suite }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- suite: general
command: pnpm test:spec-generic
- suite: phase0
command: pnpm test:spec-static
fork: phase0
- suite: altair
command: pnpm test:spec-static
fork: altair
- suite: bellatrix
command: pnpm test:spec-static
fork: bellatrix
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- run: corepack enable
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 24
cache: pnpm
- name: Bootstrap
run: pnpm i --frozen-lockfile
- name: Build
run: pnpm build
- name: Generate
run: pnpm generate
# Download spec tests with cache
- name: Restore spec tests cache
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: packages/ssz/spec-tests
key: spec-test-data-${{ hashFiles('packages/ssz/test/specTestVersioning.ts') }}
- name: Download spec tests
run: pnpm download-spec-tests
working-directory: packages/ssz
- name: Spec tests ${{ matrix.suite }}
run: ${{ matrix.command }}
working-directory: packages/ssz
env:
LODESTAR_FORK: ${{ matrix.fork }}
test-node:
name: Tests Node
if: ${{ always() }}
needs: [node_checks, spec_tests]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [22, 24]
steps:
- name: Verify Node checks and spec tests
env:
NODE_CHECKS_RESULT: ${{ needs.node_checks.result }}
SPEC_TESTS_RESULT: ${{ needs.spec_tests.result }}
run: |
test "$NODE_CHECKS_RESULT" = success
test "$SPEC_TESTS_RESULT" = success
test-bun:
name: Tests Bun
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version: 22
- run: corepack enable
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Generate
run: bun run --filter '*' generate
- name: Unit Tests
run: bun run --bun --filter '*' test:unit