-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.travis.yml
45 lines (45 loc) · 1.19 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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
language: crystal
services:
- postgresql
cache:
directories:
- lib
jobs:
include:
- stage: Tests
name: Crystal spec
script:
- crystal spec
- name: PostgreSQL spec
env:
- POSTGRESQL_URL=postgres://postgres@localhost:5432/test
before_script:
- psql -c 'create database test;' -U postgres
- psql $POSTGRESQL_URL < db_spec/pg/migration.sql
script:
- env POSTGRESQL_URL=$POSTGRESQL_URL crystal spec db_spec/pg
- name: SQLite3 spec
env: $SQLITE3_URL=sqlite3://./test.sqlite3
before_script:
- sqlite3 ./test.sqlite3 < db_spec/sqlite3/migration.sql
script:
- env SQLITE3_URL=$SQLITE3_URL crystal spec db_spec/sqlite3
- stage: Deployment
before_install:
- nvm install 9
- npm install shelljs got
script:
- crystal docs
after_success:
- node .travis/trigger-dependant-builds.js
deploy:
provider: pages
skip_cleanup: true
keep_history: true
github_token: $GITHUB_TOKEN
on:
tags: true
condition: $TRAVIS_TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+$
local_dir: docs
addons:
postgresql: "9.5"