Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (45 sloc) 1.41 KB
---
version: 2
jobs:
build:
docker:
- image: node:8
- image: circleci/postgres:10-alpine
environment:
POSTGRES_USER: gql_test
POSTGRES_DB: gql_test
- image: hasura/graphql-engine:latest
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://gql_test:@localhost:5432/gql_test
HASURA_GRAPHQL_ACCESS_KEY: verysecretaccesskey
command:
- sh
- -c
- "sleep 30; graphql-engine serve"
# TODO: ^ need better checks than delays
working_directory: ~/cli
environment:
GRAPHQURL_TEST_GRAPHQL_ENGINE_URL: http://localhost:8080
GRAPHQURL_TEST_X_HASURA_ACCESS_KEY: verysecretaccesskey
steps:
- checkout
- restore_cache: &restore_cache
keys:
- v1-npm-{{checksum ".circleci/config.yml"}}-{{ checksum "package-lock.json"}}
- v1-npm-{{checksum ".circleci/config.yml"}}
- run:
name: Install dependencies
command: .circleci/greenkeeper
- run: ./bin/run --version
- run: ./bin/run --help
# TODO: need better checks that delays
- run: sleep 30
- run:
name: Test
command: npm test
- save_cache:
key: v1-yarn-{{checksum ".circleci/config.yml"}}-{{checksum "yarn.lock"}}
paths:
- ~/cli/node_modules
- ~/.npm
- /usr/local/lib/node_modules