-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change run order, cache node modules, checkout repo
- Loading branch information
Showing
1 changed file
with
32 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
name: Run tests | ||
|
||
on: [push, pull_request] | ||
on: [push] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
CIRCLES_DOCKER: $HOME/CirclesUBI/circles-docker | ||
CIRCLES_CORE: $HOME/CirclesUBI/circles-core | ||
CIRCLES_DOCKER: $/home/runner/work/circles-docker/circles-docker #$HOME/CirclesUBI/circles-docker | ||
CIRCLES_CORE: $/home/runner/work/circles-core/circles-core | ||
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 | ||
|
@@ -22,34 +23,51 @@ jobs: | |
- name: Disable postgres | ||
run: sudo /etc/init.d/postgresql stop | ||
|
||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Copy core configs | ||
run: cp .env.example .env | ||
|
||
- name: Get circles-docker repository and copy configs | ||
env: | ||
CIRCLES_DOCKER: $HOME/CirclesUBI/circles-docker | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: CirclesUBI/circles-docker.git | ||
ref: main | ||
|
||
- name: Setup docker repo | ||
run: | | ||
git clone https://github.com/CirclesUBI/circles-docker.git $CIRCLES_DOCKER | ||
cd $CIRCLES_DOCKER | ||
cp .env.example .env | ||
- name: Container setup via docker-compose and migrate contracts | ||
run: | | ||
make build | ||
make up | ||
make contracts | ||
make subgraph | ||
$DOCKER_COMPOSE build | ||
$DOCKER_COMPOSE up | ||
$DOCKER_COMPOSE contracts | ||
$DOCKER_COMPOSE subgraph | ||
- name: Try starting failed services | ||
run: make up | ||
|
||
- name: Copy core configs | ||
run: | | ||
cd $CIRCLES_CORE | ||
cp .env.example .env | ||
- name: Switch to circles-core | ||
run: cd $CIRCLES_CORE | ||
|
||
- name: Setup Node | ||
uses: actions/[email protected] | ||
with: | ||
node-version: '12.x' | ||
|
||
- name: Cache Node.js modules | ||
uses: actions/cache@v2 | ||
with: | ||
# npm cache files are stored in `~/.npm` on Linux/macOS | ||
path: ~/.npm | ||
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-node- | ||
${{ runner.OS }}- | ||
- name: Install dependencies | ||
run: npm install | ||
|
||
|