name: Unit tests

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  testing:
    runs-on: ubuntu-latest
    steps:
    - name: Clone repository
      uses: actions/checkout@v2
    - name: Execute tests
      run: |
        ./gradlew test --stacktrace
    - name: Android Integration Test
      uses: ReactiveCircus/android-emulator-runner@v2.19.0
      with:
          api-level: 28
          script: ./gradlew test
