-
Notifications
You must be signed in to change notification settings - Fork 64
104 lines (92 loc) · 2.46 KB
/
build.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
104
name: Ziggurat CI
on:
push:
tags:
pull_request:
branches:
- master
jobs:
lint_check:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v1
with:
java-version: "1.8"
- uses: DeLaGuardo/setup-clojure@master
with:
lein: "2.8.1"
- uses: actions/checkout@v2
- name: Lint Checks
run: lein cljfmt check
- name: Lein Kibit Check
run: lein kibit
run_tests_with_kafka_cluster:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v1
with:
java-version: "1.8"
- uses: DeLaGuardo/setup-clojure@master
with:
lein: "2.8.1"
- uses: actions/checkout@v2
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Run Tests on Kafka Cluster
run: ./bin/run_cluster_tests_in_ci.sh
env:
CONFLUENT_VERSION: 5.3.0
calculate_coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-java@v1
with:
java-version: "1.8"
- uses: DeLaGuardo/setup-clojure@master
with:
lein: "2.8.1"
- uses: actions/checkout@v2
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Calculate Coverage
run: make coverage
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy_to_clojars:
runs-on: ubuntu-latest
needs:
[
lint_check,
run_tests_with_kafka_cluster,
calculate_coverage,
]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
env:
CLOJARS_USERNAME: ${{ secrets.CLOJARS_USERNAME }}
CLOJARS_PASSWORD: ${{ secrets.CLOJARS_PASSWORD }}
steps:
- uses: actions/setup-java@v1
with:
java-version: "1.8"
- uses: DeLaGuardo/setup-clojure@master
with:
lein: "2.8.1"
- uses: actions/checkout@v2
- name: Deploy to Clojars
run: lein deploy clojars
send_update_event:
runs-on: ubuntu-latest
needs: [deploy_to_clojars]
if: ${{ startsWith(github.ref, 'refs/tags/') }}
steps:
- uses: peter-evans/repository-dispatch@v1
with:
token: ${{secrets.GH_TOKEN}}
repository: gojek/ziggurat-web
event-type: ziggurat-release-event