4.10.1 #694
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 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 -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 |