-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (84 loc) · 3.14 KB
/
build-and-test-e2e.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: Build/Cache Docker + E2E Tests
on:
pull_request:
types: [opened, synchronize]
jobs:
build-and-test:
name: ${{ matrix.test_suite.name }}
runs-on: ubuntu-latest
strategy:
matrix:
test_suite:
- name: build-and-test-e2e-full-system
command: "full system:"
- name: build-and-test-e2e-canon-addr-registry
command: "Canonical Address Registry"
- name: insertion writer test suite
command: "InsertionWriter"
- name: build-and-test-e2e-deposit-fetching
command: "Fetching Deposit Events"
- name: rpc sync test suite
command: "syncing NocturneClient with RPCSyncAdapter"
- name: subgraph sync test suite
command: "syncing NocturneClient with SubgraphSyncAdapter"
- name: uniswap v3 fork tests
command: "submits single hop"
steps:
- name: checkout repo and get submodules
uses: actions/checkout@v4
with:
submodules: recursive
path: ./monorepo
- name: Checkout protocol repo
uses: actions/checkout@v4
with:
repository: nocturne-xyz/protocol
path: ./protocol
ref: main
- name: cache dependencies
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install redis with apt
run: |
sudo apt install lsb-release curl gpg
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis
- name: install node
uses: actions/setup-node@v3
with:
node-version: "v18.12.1"
cache: "yarn"
cache-dependency-path: ./monorepo/yarn.lock
- name: corepack enable
run: corepack enable
- name: install foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly-e15e33a07c0920189fc336391f538c3dad53da73
- name: yarn install in protocol
working-directory: ./protocol
run: yarn install --immutable
- name: yarn install-deps in protocol
working-directory: ./protocol
run: yarn install-deps
- name: yarn build in protocol
working-directory: ./protocol
run: yarn build
- name: yarn install in monorepo
working-directory: ./monorepo
run: yarn install --immutable
- name: yarn link in monorepo
working-directory: ./monorepo
run: yarn link:protocol
- name: yarn build in monorepo
working-directory: ./monorepo
run: yarn build
- name: run ${{ matrix.test_suite.name }}
working-directory: ./monorepo/packages/e2e-tests
env:
REDISMS_SYSTEM_BINARY: "/usr/bin/redis-server"
run: yarn test:e2e -g '${{ matrix.test_suite.command }}'