merge develop to main #500
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: Tests Pipeline | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
pull_request: | |
branches: [ main, develop ] | |
types: [ opened, synchronize, closed ] | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
name: State Channel Demo Tests | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 100 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Npm install client | |
run: cd client && npm ci | |
- name: Log node version | |
run: node -v | |
- name: Npm install server | |
run: cd server && npm ci | |
- name: Start containers | |
run: docker-compose up -d --build | |
- name: List running containers | |
run: docker ps | |
- name: Sleep for a minute | |
run: sleep 60 | |
- name: Start server | |
run: cd server && npm run dev & | |
- name: Sleep for a minute | |
run: sleep 60 | |
- name: Run client tests | |
run: cd client && npm run test | |
- name: Run server tests | |
run: cd server && npm run test |