diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e5e637961..807cc5fa75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,9 @@ name: Build on: - pull_request: {} + pull_request: { } push: - branches: [master, develop] + branches: [ master, develop ] jobs: debug: @@ -24,15 +24,6 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- - - name: Lint ${{ matrix.target }} release - run: ./gradlew clean lint${{ matrix.target }}Release --stacktrace - - name: Upload ${{ matrix.target }} linting report - uses: actions/upload-artifact@v2 - if: always() - with: - name: release-debug-linting-report-${{ matrix.target }} - path: | - vector/build/reports/*.* - name: Assemble ${{ matrix.target }} debug apk run: ./gradlew assemble${{ matrix.target }}Debug --stacktrace - name: Upload ${{ matrix.target }} debug APKs diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 9cbb1f4d2e..92e7a3e647 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -1,9 +1,9 @@ name: Code Quality Checks on: - pull_request: {} + pull_request: { } push: - branches: [master, develop] + branches: [ master, develop ] jobs: check: @@ -44,3 +44,31 @@ jobs: with: name: linting-report-android-sdk path: matrix-sdk-android/build/reports/*.* + + apk-lint: + name: Lint APK (${{ matrix.target }}) + runs-on: ubuntu-latest + if: github.ref != 'refs/heads/master' + strategy: + fail-fast: false + matrix: + target: [ Gplay, Fdroid ] + steps: + - uses: actions/checkout@v2 + - 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: Lint ${{ matrix.target }} release + run: ./gradlew clean lint${{ matrix.target }}Release --stacktrace + - name: Upload ${{ matrix.target }} linting report + uses: actions/upload-artifact@v2 + if: always() + with: + name: release-debug-linting-report-${{ matrix.target }} + path: | + vector/build/reports/*.*