-
Notifications
You must be signed in to change notification settings - Fork 5
76 lines (60 loc) · 2.51 KB
/
tests.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
name: Run tests
on: [push]
jobs:
tests:
runs-on: circles-ubuntu-8-32-300
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
DOCKER_COMPOSE: docker-compose -f docker-compose.yml -f docker-compose.frontend.yml -p circles
steps:
- name: Add hosts to /etc/hosts
run: |
sudo echo "127.0.1.1 api.circles.local" | sudo tee -a /etc/hosts
sudo echo "127.0.1.1 graph.circles.local" | sudo tee -a /etc/hosts
sudo echo "127.0.1.1 relay.circles.local" | sudo tee -a /etc/hosts
- name: Check out circles-core repository code
uses: actions/checkout@v3
with:
path: circles-core
- name: Copy core configs
working-directory: circles-core
run: cp .env.example .env
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: 'circles-core/.nvmrc'
cache: 'npm'
cache-dependency-path: circles-core/package-lock.json
- name: Get circles-docker repository and copy configs
uses: actions/checkout@v3
with:
repository: CirclesUBI/circles-docker.git
ref: test-api-profile-migration
path: circles-docker
- name: Setup docker repo
working-directory: circles-docker
run: cp .env.example .env
- name: Container setup via docker-compose without pathfinder
working-directory: circles-docker
run: docker compose -f docker-compose.yml -f docker-compose.relayer-pull.yml -f docker-compose.api-pull.yml -p circles up --detach --remove-orphans --build
- name: Download and migrate contracts
working-directory: circles-docker
run: ./scripts/migrate-contracts.sh
- name: Try starting failed services
working-directory: circles-docker
run: docker compose -f docker-compose.yml -f docker-compose.relayer-pull.yml -f docker-compose.api-pull.yml -p circles up --detach --remove-orphans --build
- name: Container setup via docker-compose for pathfinder
working-directory: circles-docker
run: docker compose -f docker-compose.pathfinder-pull.yml -p circles up --detach --build
- name: Install dependencies
working-directory: circles-core
run: npm install
- name: Check code formatting
working-directory: circles-core
run: npm run lint
- name: Run tests
working-directory: circles-core
run: npm run test
- name: Build
working-directory: circles-core
run: npm run build