Skip to content

Merge pull request #227 from CirclesUBI/207-organisation-replacement #607

Merge pull request #227 from CirclesUBI/207-organisation-replacement

Merge pull request #227 from CirclesUBI/207-organisation-replacement #607

Workflow file for this run

name: Run tests
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
DOCKER_COMPOSE: docker-compose -f docker-compose.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: main
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 -f docker-compose.payment-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 -f docker-compose.payment-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