-
Notifications
You must be signed in to change notification settings - Fork 235
114 lines (97 loc) · 2.99 KB
/
bri-3.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
111
112
113
114
name: bri-3
on:
push:
paths:
- examples/bri-3/**
branches:
- main
- develop
pull_request:
paths:
- examples/bri-3/**
branches:
- main
- develop
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node: [17.0.0]
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: example
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
nats:
image: nats:alpine
ports:
- 4222:4222
env:
DATABASE_URL: "postgresql://postgres:example@localhost:5432/postgres"
DID_REGISTRY: "0x03d5003bf0e79c5f5223588f347eba39afbc3818"
DID_BPI_OPERATOR_PUBLIC_KEY: "0x08872e27BC5d78F1FC4590803369492868A1FCCb"
DID_BPI_OPERATOR_PRIVATE_KEY: "2c95d82bcd8851bd3a813c50afafb025228bf8d237e8fd37ba4adba3a7596d58"
CCSM_NETWORK: "sepolia"
INFURA_PROVIDER_API_KEY: "c5f37cd25eca4007a9768f18f492bc6f"
CCSM_BPI_STATE_ANCHOR_CONTRACT_ADDRESS: "<smart_contract_address>"
SERVICE_URL: "bri-3"
BPI_NATS_SERVER_URL: "localhost:4222"
BPI_NATS_SERVER_USER: "bpi_operator"
BPI_NATS_SERVER_PASS: "liftboiliftboiliftboiliftboi1"
BPI_ENCRYPTION_KEY_K_PARAM: "yzkXp3vY_AZQ3YfLv9GMRTYkjUOpn9x18gPkoFvoUxQ"
BPI_ENCRYPTION_KEY_KTY_PARAM: "oct"
SNARKJS_CIRCUITS_PATH: "zeroKnowledgeArtifacts/circuits/"
VSM_CYCLE_PERIOD_IN_SECS: 15
VSM_CYCLE_TX_BATCH_SIZE: 5
MERKLE_TREE_HASH_ALGH: "sha256"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node env
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Cache node_modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
working-directory: examples/bri-3
run: npm ci
- name: Run build
working-directory: examples/bri-3
run: npm run build
- name: Run prettier
working-directory: examples/bri-3
run: npm run format:check
- name: Run linter
working-directory: examples/bri-3
run: npm run lint:check
- name: Run prisma generate
working-directory: examples/bri-3
run: npm run prisma:generate
- name: Run tests
working-directory: examples/bri-3
run: npm run test
- name: Run prisma migrate
working-directory: examples/bri-3
run: npm run prisma:migrate:dev
- name: Run prisma db seed
working-directory: examples/bri-3
run: npx prisma db seed
- name: Run e2e tests
working-directory: examples/bri-3
run: npm run test:e2e