Skip to content

Commit d31736e

Browse files
committed
Flatten CI workflow & remove unnecessary CI caching
The CI cache is tied to as single branch, and is not very effective. It is my estimation that we don't build this often enough that the caching is worth the extra complexity in the config. Flatten the workflow so the tests don't have to depend on the check. This means fewer CI roundtrips to find out that both check and test jobs fail.
1 parent 3873b46 commit d31736e

File tree

2 files changed

+7
-36
lines changed

2 files changed

+7
-36
lines changed

.circleci/config.yml

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,62 +6,31 @@ defaults: &defaults
66
version: 2
77

88
jobs:
9-
build:
9+
check:
1010
<<: *defaults
1111
steps:
1212
- checkout
13-
14-
- restore_cache:
15-
keys:
16-
- v1-m2-{{ .Branch }}-{{ checksum "project.clj" }}
17-
1813
- run: lein deps
19-
2014
- run: lein check
2115

22-
- save_cache:
23-
key: v1-m2-{{ .Branch }}-{{ checksum "project.clj" }}
24-
paths:
25-
- "~/.m2"
26-
2716
docs:
2817
<<: *defaults
2918
steps:
3019
- checkout
31-
32-
- restore_cache:
33-
keys:
34-
- v1-m2-{{ .Branch }}-{{ checksum "project.clj" }}
35-
20+
- run: lein deps
3621
- run: lein codox
3722

38-
- save_cache:
39-
key: v1-m2-{{ .Branch }}-{{ checksum "project.clj" }}
40-
paths:
41-
- "~/.m2"
42-
4323
test:
4424
<<: *defaults
4525
steps:
4626
- checkout
47-
48-
- restore_cache:
49-
keys:
50-
- v1-m2-{{ .Branch }}-{{ checksum "project.clj" }}
51-
27+
- run: lein deps
5228
- run: lein test
5329

54-
- save_cache:
55-
key: v1-m2-{{ .Branch }}-{{ checksum "project.clj" }}
56-
paths:
57-
- "~/.m2"
58-
5930
workflows:
6031
version: 2
6132
build_and_test:
6233
jobs:
63-
- build
34+
- check
6435
- docs
65-
- test:
66-
requires:
67-
- build
36+
- test

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Version NEXT
99
* [#31](https://github.com/circleci/analytics-clj/pull/31): Bump Clojure dependency to 1.11.2
1010
* [#27](https://github.com/circleci/analytics-clj/pull/27): Bump transitive dependency okio-java and move it to managed-dependencies
1111
* [#34](https://github.com/circleci/analytics-clj/pull/34): Bump `com.segment.analytics.java` dependency
12+
* Chore: Flatten CI workflow
13+
* Chore: Remove CI cache steps
1214

1315
Version 0.8.2 (October 3, 2023)
1416
================================

0 commit comments

Comments
 (0)