-
Notifications
You must be signed in to change notification settings - Fork 39
/
config.yml
103 lines (95 loc) · 2.65 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
95
96
97
98
99
100
101
102
103
version: 2.1
# Common executor configuration
executors:
clojure:
docker:
- image: clojure:tools-deps
working_directory: ~/repo
# Job definitions
jobs:
lint:
executor: clojure
steps:
- checkout
- run:
name: Install clj-kondo
environment:
CLJ_KONDO_VERSION: 2024.11.14
command: |
apt update && apt install -yy curl unzip
curl -L https://github.com/borkdude/clj-kondo/releases/download/v${CLJ_KONDO_VERSION}/clj-kondo-${CLJ_KONDO_VERSION}-linux-amd64.zip -o clj-kondo.zip
unzip clj-kondo.zip
- run:
name: Lint source code
command: "./clj-kondo --lint src:test"
style:
executor: clojure
steps:
- checkout
- restore_cache:
keys:
- v2-test-{{ checksum "deps.edn" }}
- v2-test-
- run:
name: Check formatting
command: bin/run check
test:
executor: clojure
steps:
- checkout
- restore_cache:
keys:
- v2-test-{{ checksum "deps.edn" }}
- v2-test-
- run: bin/test check
- run: bin/test unit
- save_cache:
key: v2-test-{{ checksum "deps.edn" }}
paths:
- ~/.m2
coverage:
executor: clojure
steps:
- checkout
- restore_cache:
keys:
- v2-coverage-{{ checksum "deps.edn" }}
- v2-coverage-
- v2-test-
- run:
name: Generate test coverage
command: bin/test coverage --codecov
- save_cache:
paths:
- ~/.m2
key: v2-coverage-{{ checksum "deps.edn" }}
- store_artifacts:
path: target/coverage
destination: coverage
- run:
name: Install codecov
command: |
apt update && apt install -yy curl gpg
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov
- run:
name: Publish coverage report
command: './codecov -f target/coverage/codecov.json'
# Workflow definitions
workflows:
version: 2
test:
jobs:
- lint
- test
- style:
requires:
- test
- coverage:
requires:
- test