From 23f7f72e38260303c9b8b10e29bd3735ca8bd10c Mon Sep 17 00:00:00 2001 From: Michael Kaye <1917473+michaelkaye@users.noreply.github.com> Date: Thu, 10 Mar 2022 15:58:00 +0000 Subject: [PATCH] Compile tests on PR, to ensure we don't break the build when merging. This was accidentally committed to develop and reverted there. --- .github/workflows/nightly.yml | 47 ----------------------------------- .github/workflows/tests.yml | 44 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 47 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index de97b26fbf..d8c1bb6c49 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -14,50 +14,6 @@ env: -Porg.gradle.jvmargs=-Xmx4g -Porg.gradle.parallel=false jobs: - # Build Android Tests [Matrix SDK] - build-android-test-matrix-sdk: - name: Matrix SDK - Build Android Tests - runs-on: macos-latest - # No concurrency required, runs every time on a schedule. - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v2 - with: - distribution: 'adopt' - java-version: 11 - - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Build Android Tests for matrix-sdk-android - run: ./gradlew clean matrix-sdk-android:assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace - - # Build Android Tests [Matrix APP] - build-android-test-app: - name: App - Build Android Tests - runs-on: macos-latest - # No concurrency required, runs every time on a schedule. - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v2 - with: - distribution: 'adopt' - java-version: 11 - - uses: actions/cache@v2 - with: - path: | - ~/.gradle/caches - ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Build Android Tests for vector - run: ./gradlew clean vector:assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace - # Run Android Tests integration-tests: name: Matrix SDK - Running Integration Tests @@ -367,9 +323,6 @@ jobs: needs: - integration-tests - ui-tests -# - unit-tests - - build-android-test-matrix-sdk - - build-android-test-app - sonarqube if: always() && github.event_name != 'workflow_dispatch' # No concurrency required, runs every time on a schedule. diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d739afcd30..18c225ad30 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,6 +12,50 @@ env: -Porg.gradle.parallel=false jobs: + # Build Android Tests [Matrix SDK] + build-android-test-matrix-sdk: + name: Matrix SDK - Build Android Tests + runs-on: ubuntu-latest + # No concurrency required, runs every time on a schedule. + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Build Android Tests for matrix-sdk-android + run: ./gradlew clean matrix-sdk-android:assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace + + # Build Android Tests [Matrix APP] + build-android-test-app: + name: App - Build Android Tests + runs-on: ubuntu-latest + # No concurrency required, runs every time on a schedule. + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v2 + with: + distribution: 'adopt' + java-version: 11 + - uses: actions/cache@v2 + with: + path: | + ~/.gradle/caches + ~/.gradle/wrapper + key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} + restore-keys: | + ${{ runner.os }}-gradle- + - name: Build Android Tests for vector + run: ./gradlew clean vector:assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace + unit-tests: name: Run Unit Tests runs-on: ubuntu-latest