-
Notifications
You must be signed in to change notification settings - Fork 4
110 lines (88 loc) · 2.85 KB
/
test.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
102
103
104
105
106
107
108
109
110
name: Integration Test
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
Test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_DB: postgres_db # optional (defaults to `postgres`)
POSTGRES_PASSWORD: postgres_password # required
POSTGRES_PORT: 5432 # optional (defaults to `5432`)
POSTGRES_USER: postgres_user # optional (defaults to `postgres`)
# `POSTGRES_HOST` is `localhost`
ports:
- 5432:5432 # maps tcp port 5432 on service container to the host
options: >- # set health checks to wait until postgres has started
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
# Python setup
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.10.12
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r mm-bot/requirements.txt
# Postgres setup
- name: Install PSQL
run: |
sudo apt-get update
sudo apt-get install --yes postgresql-client
- name: Create tables
run: |
psql -h localhost -d postgres_db -U postgres_user -f mm-bot/resources/schema.sql
psql -h localhost -d postgres_db -U postgres_user -c "SELECT * FROM block;"
env:
PGPASSWORD: postgres_password
# Ethereum Setup
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Run Anvil
run: |
anvil &
# Starknet Setup
- name: Install scarb
uses: software-mansion/setup-scarb@v1
with:
scarb-version: "0.7.0"
- name: Install starkliup
run: curl https://get.starkli.sh | sh
- name: Install Starkli
run: |
/home/runner/.config/.starkli/bin/starkliup --version 0.1.20
sudo mv /home/runner/.config/.starkli/bin/starkli /usr/local/bin/
- name: Setup Katana .env
run: |
cp .github/workflows/katana/katana.env .env
- name: Download Katana
run: |
wget https://github.com/dojoengine/dojo/releases/download/v0.3.1/dojo_v0.3.1_linux_amd64.tar.gz
tar -xzvf dojo_v0.3.1_linux_amd64.tar.gz
rm sozo torii dojo-language-server
- name: Run Katana
run: |
./katana &
- name: Setup Katana Account
run: |
.github/workflows/scripts/setup_katana_account.sh
# Deploy Ethereum Contract
# Deploy Starknet Contract
# Run mm-bot (it should run a single process order listening to the contract once)