-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
23 lines (21 loc) · 1.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
language: node_js
node_js: "10.6.0"
services:
- postgresql
env:
global:
- CC_TEST_REPORTER_ID=0d32a226e2fbf7655a9f31be4b9f877660536e52eae163907bd447f573fc1028
before_script:
- psql -c 'CREATE DATABASE travis_test;' -U postgres
- psql -c 'CREATE TABLE users (id serial PRIMARY KEY, firstname varchar(100) not null, lastname varchar(100) not null, email varchar(100) not null, password varchar(250) not null, created_at TIMESTAMP NOT NULL DEFAULT NOW(), updated_at TIMESTAMP NOT NULL DEFAULT NOW());' -U postgres -d travis_test
- psql -c "INSERT INTO users (firstname, lastname, email, password) VALUES ('Chinyere', 'Ukaegbu', 'obi@gmail.com' ,'lastdays');" -U postgres -d travis_test
- psql -c 'CREATE TABLE entries (id serial PRIMARY KEY, title varchar(100) not null, image_url varchar(1000) not null, entry_note TEXT not null, user_id integer REFERENCES users (id), created_at TIMESTAMP NOT NULL DEFAULT NOW(), updated_at TIMESTAMP NOT NULL DEFAULT NOW());' -U postgres -d travis_test
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- npm test
after_script:
- npm run coverage
- npm run coveralls
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT