diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml new file mode 100644 index 000000000..e3db8c958 --- /dev/null +++ b/.github/workflows/testing.yml @@ -0,0 +1,54 @@ +name: Large Tests +on: + workflow_dispatch: +# inputs: +# tags: +# description: 'Test scenario tags' +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out source code + uses: actions/checkout@v1 + + - name: Install Java Development Kit 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Build & Run small tests + run: ./build.sh build + + - name: Upload APK + uses: actions/upload-artifact@v2 + with: + name: debug-apk + path: uhabits-android/build/*apk + + - name: Upload build outputs + uses: actions/upload-artifact@v2 + with: + name: build + path: uhabits-android/build/outputs/ + + test: + needs: build + runs-on: macOS-latest + strategy: + matrix: + api-level: [28] + steps: + - name: Check out source code + uses: actions/checkout@v1 + + - name: Download previous build folder + uses: actions/download-artifact@v2 + with: + name: build + path: uhabits-android/build/outputs/ + + - name: Run tests + uses: ReactiveCircus/android-emulator-runner@v2 + with: + api-level: ${{ matrix.api-level }} + script: ./build.sh large-tests