Skip to content

Commit 6b32b64

Browse files
committed
Add deno workflow for tests
1 parent 64b7734 commit 6b32b64

File tree

2 files changed

+60
-1
lines changed

2 files changed

+60
-1
lines changed

.github/workflows/test-deno.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Tests Deno
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
test:
7+
name: Tests Deno
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
deno: [2]
13+
steps:
14+
- uses: actions/checkout@v3
15+
- run: corepack enable
16+
- uses: denoland/setup-deno@v2
17+
with:
18+
deno-version: ${{matrix.deno}}
19+
- name: Bootstrap
20+
run: deno install
21+
- name: Generate
22+
run: cd packages/as-sha256 && deno run -R -W -I scripts/codegen.ts
23+
- name: Unit Tests
24+
run: JS_RUNTIME=deno deno task --recursive --filter '' test:unit
25+
26+
# Download spec tests with cache
27+
- name: Restore spec tests cache
28+
uses: actions/cache@master
29+
with:
30+
path: packages/ssz/spec-tests
31+
key: spec-test-data-${{ hashFiles('packages/ssz/test/specTestVersioning.ts') }}
32+
- name: Download spec tests
33+
run: yarn download-spec-tests
34+
working-directory: packages/ssz
35+
36+
# Run them in different steps to quickly identifying which command failed
37+
# Otherwise just doing `yarn test:spec` you can't tell which specific suite failed
38+
# many of the suites have identical names for minimal and mainnet
39+
- name: Spec tests general
40+
run: deno task -R -W test:spec-generic
41+
working-directory: packages/ssz
42+
- name: Spec tests phase0-minimal
43+
run: LODESTAR_FORK=phase0 deno task -R -W test:spec-static-minimal
44+
working-directory: packages/ssz
45+
- name: Spec tests phase0-mainnet
46+
run: LODESTAR_FORK=phase0 deno task -R -W test:spec-static-mainnet
47+
working-directory: packages/ssz
48+
- name: Spec tests altair-minimal
49+
run: LODESTAR_FORK=altair deno task -R -W test:spec-static-minimal
50+
working-directory: packages/ssz
51+
- name: Spec tests altair-mainnet
52+
run: LODESTAR_FORK=altair deno task -R -W test:spec-static-mainnet
53+
working-directory: packages/ssz
54+
- name: Spec tests bellatrix-minimal
55+
run: LODESTAR_FORK=bellatrix deno task -R -W test:spec-static-minimal
56+
working-directory: packages/ssz
57+
- name: Spec tests bellatrix-mainnet
58+
run: LODESTAR_FORK=bellatrix deno task -R -W test:spec-static-mainnet
59+
working-directory: packages/ssz

.github/workflows/test-node.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Lint
2929
run: yarn lint
3030
- name: Unit Tests
31-
run: yarn test:unit
31+
run: yarn lerna run test:unit
3232
- name: Browsers Tests
3333
run: yarn test:browsers
3434

0 commit comments

Comments
 (0)