Skip to content

Merge pull request #591 from indrekj/ack-fun #451

Merge pull request #591 from indrekj/ack-fun

Merge pull request #591 from indrekj/ack-fun #451

Workflow file for this run

name: brod
on:
push:
branches:
- "*"
pull_request:
branches:
- master
env:
OTP_VERSION: "26"
REBAR_VERSION: "3.23.0"
jobs:
lint:
runs-on: ubuntu-20.04
name: Lint
steps:
- name: Checkout
uses: actions/checkout@v2
- name: OTP
uses: erlef/setup-beam@v1
with:
version-type: strict
otp-version: ${{ env.OTP_VERSION }}
rebar3-version: ${{ env.REBAR_VERSION }}
- name: Cache Build
id: cache-lint-hex
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-${{ env.OTP_VERSION }}-rebar-${{ hashFiles('**/rebar.lock') }}
restore-keys: ${{ runner.os }}-rebar-
- name: Cache Dialyzer PLTs
uses: actions/cache@v3
with:
path: ~/.cache/rebar3/rebar3_*_plt
key: ${{ runner.os }}-dialyzer-${{ hashFiles('**/rebar.lock') }}
restore-keys: ${{ runner.os }}-dialyzer-
- name: Lint, Dialyzer & Xref
run: rebar3 do compile,lint,dialyzer,xref
build:
runs-on: ubuntu-20.04
name: OTP ${{matrix.otp}} / Kafka ${{matrix.kafka}}
strategy:
fail-fast: false
matrix:
otp: ["26", "27"]
kafka: ["0.9", "0.10", "0.11", "2.8", "1.1", "3.6"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache Build
uses: actions/cache@v3
with:
path: _build
key: ${{ runner.os }}-${{ matrix.otp }}-rebar-${{ hashFiles('**/rebar.lock') }}
restore-keys: ${{ runner.os }}-${{ matrix.otp }}-rebar-
- name: Install Erlang
uses: erlef/setup-beam@v1
with:
version-type: strict
otp-version: ${{matrix.otp}}
rebar3-version: ${{ env.REBAR_VERSION }}
- name: Compile
run: rebar3 do compile
- name: Make brod_cli script
run: rebar3 as brod_cli escriptize
- name: Run tests
run: |
export KAFKA_VERSION=${{ matrix.kafka }}
echo "Running Kafka ${KAFKA_VERSION}"
make test-env
make t
- name: Store test logs
uses: actions/upload-artifact@v1
if: always()
with:
name: ct-logs-otp-${{matrix.otp}}-kafka-${{matrix.kafka}}
path: _build/test/logs
- name: Create Cover Reports
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: rebar3 do cover,coveralls send
docs:
needs: build
runs-on: ubuntu-20.04
name: Publish Documentation
steps:
- name: Checkout
uses: actions/checkout@v2
- name: OTP
uses: erlef/setup-beam@v1
with:
version-type: strict
otp-version: ${{ env.OTP_VERSION }}
rebar3-version: ${{ env.REBAR_VERSION }}
- name: Build Documentation
run: rebar3 do hex build
- name: Publish documentation
uses: actions/upload-artifact@v1
with:
name: edoc
path: doc