Feature/testarm64 #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test | |
on: | |
pull_request: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build_and_test_with_code_coverage: | |
name: Build and test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04, windows-latest, macos-latest ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- name: Cache konan | |
uses: actions/cache@v3 | |
with: | |
path: ~/.konan | |
key: ${{ runner.os }}-gradle-konan | |
restore-keys: | | |
${{ runner.os }}-gradle-konan | |
- name: Install librdkafka on Linux | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
wget -qO - https://packages.confluent.io/deb/7.5/archive.key | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/7.5 stable main" | |
sudo add-apt-repository "deb https://packages.confluent.io/clients/deb $(lsb_release -cs) main" | |
sudo apt-get update | |
sudo apt install librdkafka-dev | |
- name: Install librdkafka on macOS | |
if: ${{ runner.os == 'macOS' }} | |
run: | | |
brew install librdkafka | |
- name: Gradle build | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: wrapper | |
arguments: | | |
build | |
-x detekt | |
- name: check current dir | |
if: ${{ runner.os == 'Windows' }} | |
run: | | |
pwd | |
ls -al | |
- name: Upload gradle reports | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gradle-reports-${{ matrix.os }} | |
path: '**/build/reports/' | |
- name: Code coverage report | |
#if: ${{ runner.os == 'Linux' }} | |
if: ${{ false }} | |
uses: codecov/codecov-action@v1 | |
with: | |
flags: unittests | |
fail_ci_if_error: true # optional (default = false) |