name: Build & Test
on:
  pull_request:
    paths-ignore:
    - '**.md'
  push:
    paths-ignore:
    - '**.md'
jobs:
  Test:
    runs-on: self-hosted
    steps:
    - name: Check out source code
      uses: actions/checkout@v1

    - name: Build project
      run: ./build.sh build

    - name: Run Android tests
      run: ./build.sh android-tests-parallel 24 25 26 28 30 31

    - name: Upload artifacts
      if: always()
      uses: actions/upload-artifact@v2
      with:
        name: build
        path: |
          build/*log
          uhabits-android/build/outputs

