-
-
Notifications
You must be signed in to change notification settings - Fork 962
101 lines (88 loc) · 2.7 KB
/
test-rpc-providers.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
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
name: Test RPC Providers
on:
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
max-parallel: 3
matrix:
transport-mode: ['http', 'webSocket']
shard: [1, 2, 3]
total-shards: [3]
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Build contracts
shell: bash
run: pnpm contracts:build
- name: Run tests
uses: nick-fields/retry@v3
with:
timeout_minutes: 10
max_attempts: 3
command: pnpm test:ci --shard=${{ matrix.shard }}/${{ matrix.total-shards }}
env:
VITE_ANVIL_BLOCK_NUMBER: ${{ vars.VITE_ANVIL_BLOCK_NUMBER }}
VITE_ANVIL_BLOCK_TIME: ${{ vars.VITE_ANVIL_BLOCK_TIME }}
VITE_ANVIL_FORK_URL: ${{ secrets.VITE_ANVIL_FORK_URL__test }}
VITE_ANVIL_FORK_URL_OPTIMISM: ${{ secrets.VITE_ANVIL_FORK_URL_OPTIMISM__test }}
VITE_BATCH_MULTICALL: ${{ matrix.multicall }}
VITE_NETWORK_TRANSPORT_MODE: ${{ matrix.transport-mode }}
test-envs:
name: Test Environments
runs-on: ubuntu-latest
strategy:
matrix:
type: ['bun', 'node-18', 'node-20', 'node-latest', 'next', 'tsc', 'vite']
include:
- type: bun
runtime: bun
- type: node-18
node-version: 18
runtime: node
- type: node-20
node-version: 20
runtime: node
- type: node-latest
node-version: latest
runtime: node
- type: next
runtime: next
- type: tsc
node-version: 20
runtime: tsc
- type: vite
runtime: vite
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up Bun
if: ${{ matrix.runtime == 'bun' }}
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.0.30
- name: Set up Node
if: ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Playwright Browsers
if: ${{ matrix.runtime == 'next' || matrix.runtime == 'vite' }}
run: pnpx playwright@1.49.1 install --with-deps
- name: Install dependencies
uses: ./.github/actions/install-dependencies
- name: Build
run: pnpm build
- name: Link
run: pnpm install
- name: Run tests
run: pnpm test:env:${{ matrix.runtime }}