-
Notifications
You must be signed in to change notification settings - Fork 19
68 lines (57 loc) · 1.92 KB
/
cli.test.yaml
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
name: "cli: test"
on:
push:
branches-ignore:
- "master"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 3
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: orakl-test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20.10.0"
- name: Install dependencies
run: yarn install
- name: Delegator db migrate
run: yarn delegator prisma-migrate dev --name init-delegator
env:
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/delegator?schema=public"
- name: Api db migrate
run: yarn api prisma-migrate dev --name init-api
env:
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl?schema=public"
- name: Run delegator
run: yarn delegator build && yarn delegator start &
env:
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/delegator?schema=public"
PROVIDER_URL: "https://api.baobab.klaytn.net:8651"
APP_PORT: "3002"
DELEGATOR_FEEPAYER_PK: ${{ secrets.DELEGATOR_FEEPAYER_PK}}
TEST_DELEGATOR_REPORTER_PK: ${{ secrets.TEST_DELEGATOR_REPORTER_PK}}
- name: Run api
run: yarn api build && yarn api start &
env:
DATABASE_URL: "postgresql://postgres:postgres@localhost:5432/orakl?schema=public"
ENCRYPT_PASSWORD: "abc123"
APP_PORT: "3000"
- name: Run tests
run: yarn cli build && yarn cli test
env:
ORAKL_NETWORK_API_URL: "http://127.0.0.1:3000/api/v1"
ORAKL_NETWORK_DELEGATOR_URL: "http://127.0.0.1:3002/api/v1"