forked from worknenjoy/gitpay
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml
More file actions
96 lines (92 loc) · 2.81 KB
/
config.yml
File metadata and controls
96 lines (92 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
docs:
docker:
- image: circleci/ruby:2.5.1
steps:
- checkout
- run: bundle install
- run: bundle exec jekyll build
- deploy:
name: Deploy Release to GitHub
command: |
if [ $CIRCLE_BRANCH == 'gh-pages' ]; then
bash setup-ghpages.sh
fi
build:
docker:
# specify the version you desire here
- image: circleci/node:8.6.0
environment:
PG_HOST: 127.0.0.1
POSTGRES_DB: gitpay_test
POSTGRES_USER: postgres
PG_PASSWD: postgres
NODE_ENV: test
- image: circleci/postgres:9.5
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: gitpay_test
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
working_directory: ~/repo
steps:
- checkout
- run:
name: install
command: 'curl -k -O -L https://npmjs.org/install.sh | sh'
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Install packages
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
#- run: sudo apt install postgresql-client
- run:
name: install dockerize
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
environment:
DOCKERIZE_VERSION: v0.3.0
- run:
name: Wait for db
command: dockerize -wait tcp://localhost:5432 -timeout 1m
#- run:
# name: Set up database
# command: psql -h localhost -p 5432 -c 'create database gitpay_test' -U postgres
- run:
name: Migrate
command: npm run migrate-test
# run tests!
- run:
name: run node tests
command: npm run test
- run:
name: install frontend dependencies
command: npm install
working_directory: frontend
- run:
name: run frontend tests
command: npm run test
working_directory: frontend
workflows:
version: 2
build-all:
jobs:
- docs:
filters:
branches:
only: gh-pages
- build:
filters:
branches:
ignore: gh-pages