-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
config.yml
94 lines (77 loc) · 2.09 KB
/
config.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
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
version: 2
dry:
restore_shards_cache: &restore_shards_cache
keys:
- shards-cache-v1-{{ .Branch }}-{{ checksum "shard.yml" }}
- shards-cache-v1-{{ .Branch }}
- shards-cache-v1
save_shards_cache: &save_shards_cache
key: shards-cache-v1-{{ .Branch }}-{{ checksum "shard.yml" }}
paths:
- ./shards-cache
jobs:
test:
docker:
- image: crystallang/crystal:latest
environment:
SHARDS_CACHE_PATH: ./shards-cache
steps:
- run: crystal --version
- checkout
- restore_cache: *restore_shards_cache
- run: shards
- save_cache: *save_shards_cache
- run: make test
- run: crystal tool format --check spec src
deploy-docs:
docker:
- image: crystallang/crystal:latest
environment:
SHARDS_CACHE_PATH: ./shards-cache
steps:
- run: crystal --version
- checkout
- run: scripts/generate-docs.sh
- run: apt update && apt install -y curl rsync
- run:
command: curl https://raw.githubusercontent.com/straight-shoota/autodeploy-docs/master/autodeploy-docs.sh | bash
environment:
GIT_COMMITTER_NAME: cirlceci
GIT_COMMITTER_EMAIL: circle@circleci.com
test-on-nightly:
docker:
- image: crystallang/crystal:nightly
environment:
SHARDS_CACHE_PATH: ./shards-cache
steps:
- run: crystal --version
- checkout
- restore_cache: *restore_shards_cache
- run: shards
- run: make test
- run: crystal tool format --check spec src
workflows:
version: 2
# Run tests on every single commit
ci:
jobs:
- test
# Build and depoy docs only on master branch
- deploy-docs:
requires:
- test
filters: &master-only
branches:
only:
- master
# Run tests every night using crystal nightly
nightly:
triggers:
- schedule:
cron: "0 4 * * *"
filters:
branches:
only:
- master
jobs:
- test-on-nightly