-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.81 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
name: Run tests
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
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: Checkout repository code
uses: actions/checkout@v3
with:
path: service
- name: Set env file
working-directory: service
run: cp .env.example .env
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: "service/.nvmrc"
cache: "npm"
cache-dependency-path: service/package-lock.json
- name: Checkout circles-docker repository
uses: actions/checkout@v3
with:
repository: CirclesUBI/circles-docker.git
ref: main
path: circles-docker
- name: Set circles-docker env file
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 -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 -p circles up --detach --remove-orphans --build
- name: Install dependencies
working-directory: service
run: npm ci
- name: Run tests
working-directory: service
run: npm run test