-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
72 lines (64 loc) · 1.84 KB
/
circle.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
version: 2.1
references:
project: &project aeon
dir: &dir ~/aeon
img: &img circleci/clojure:lein-2.9.0 # leave this pinned; using cimg/clojure:1.10.1 fails
path: &path /usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/circleci/.local/bin:/root/.local/bin
environment: &environment
environment:
- PATH: *path
orbs:
codecov: codecov/codecov@1.0.5
executors:
clojure_and_postgres:
working_directory: *dir
environment:
- PATH: *path
- TEST_JDBC_DB_URI: jdbc:postgresql://localhost:5432/postgres?loginTimeout=30&socketTimeout=900&tcpKeepAlive=true&user=postgres
docker:
- image: *img
- image: circleci/postgres:9.6.9-alpine # for integration test
clojure:
working_directory: *dir
<<: *environment
docker:
- image: *img
commands:
restore_and_save_cache:
steps:
- restore_cache:
key: \<< checksum "project.clj" \>> # << and >> must be escaped: https://circleci.com/docs/2.0/build-processing/#limitations
- run: lein deps
- save_cache:
paths:
- ~/.m2
- ~/.lein
key: \<< checksum "project.clj" \>>
jobs:
test:
executor: clojure_and_postgres
steps:
- checkout
- run: git clone https://github.com/skilbjo/markets-etl.git ~/markets-etl
- restore_and_save_cache
- run: lein cloverage --codecov
- run: lein test
- run: lein cljfmt check
- codecov/upload:
file: target/coverage/codecov.json
publish:
executor: clojure
steps:
- checkout
- restore_and_save_cache
- setup_remote_docker
- run: deploy/bin/publish-image
- store_artifacts:
path: target/uberjar/app.jar
workflows:
commit:
jobs:
- test
- publish:
requires:
- test