-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (47 loc) · 1.07 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
46
47
48
49
50
51
52
dist: bionic
language: crystal
build_addons: &build_addons
postgresql: "12"
apt:
packages:
- postgresql-12
- postgresql-client-12
- libgit2-dev
crystal:
- latest
cache:
- shards
- directories:
- vendor/
env:
global:
- PGPORT: 5433
- TEST_DATABASE_URL: "postgres:https://postgres:@localhost:5433/shardbox"
- DBMATE: "vendor/bin/dbmate"
- SHARDS_OPTS: "--ignore-crystal-version"
jobs:
include:
- stage: test
name: unit tests
services:
- postgresql
addons: *build_addons
before_script: ./.travis/setup-database.sh
script: make test
- stage: test
name: migration test
addons: *build_addons
before_script: ./.travis/setup-database.sh
script: make test_db test/migration
- stage: test
name: integration test
addons: *build_addons
before_script: ./.travis/setup-database.sh
script:
- make test_db bin/worker
- |
export DATABASE_URL=$TEST_DATABASE_URL
bin/worker sync_repos && bin/worker update_metrics
- stage: test
name: format
script: crystal tool format --check src spec