forked from kafka4beam/brod
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (82 loc) · 2.1 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
name: brod
on:
push:
branches:
- '*'
pull_request:
branches:
- master
jobs:
build:
strategy:
fail-fast: false
matrix:
otp:
- '24.1'
- '23.3.4.7'
- '22.3.4.21'
kafka:
- '2.4'
- '1.1'
- '0.11'
runs-on: ubuntu-20.04
steps:
# Setup
- name: Checkout
uses: actions/checkout@v2
- name: Cache Hex packages
uses: actions/cache@v2
with:
path: ~/.cache/rebar3/hex/hexpm/packages
key: ${{ runner.os }}-hex-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.lock')) }}
restore-keys: |
${{ runner.os }}-hex-
- name: Cache Dialyzer PLTs
uses: actions/cache@v2
with:
path: ~/.cache/rebar3/rebar3_*_plt
key: ${{ runner.os }}-dialyzer-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.config')) }}
restore-keys: |
${{ runner.os }}-dialyzer-
# Install Erlang
- uses: erlef/setup-beam@v1
with:
version-type: strict
otp-version: ${{matrix.otp}}
rebar3-version: '3.17.0'
# Inspect rebar3 version
- name: Rebar version
run: rebar3 --version
# Compile
- name: Compile
run: rebar3 do compile,edoc
- name: Make brod_cli script
run: rebar3 as brod_cli escriptize
# Tests
- name: Run tests
run: |
export KAFKA_VERSION=${{ matrix.kafka }}
echo "Running Kafka ${KAFKA_VERSION}"
scripts/setup-test-env.sh && rebar3 do ct,eunit
- name: Store test logs
uses: actions/upload-artifact@v1
if: always()
with:
name: ct-logs
path: _build/test/logs
# Cover reports
- name: Create Cover Reports
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: rebar3 do cover,coveralls send
# Checks
- name: Checks
run: rebar3 do dialyzer,xref
# Documentation
- name: Documentation
run: rebar3 do edoc
- name: Publish documentation
uses: actions/upload-artifact@v1
with:
name: edoc
path: doc