diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index 773bc02d93..b9b9e25071 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -103,6 +103,39 @@ jobs: path: | **/build/reports/**/*.* + compose: + name: Compose tests + runs-on: ubuntu-latest + # Allow all jobs on main and develop. Just one per PR. + concurrency: + group: ${{ github.ref == 'refs/heads/main' && format('check-compose-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('check-compose-develop-{0}', github.sha) || format('check-compose-{0}', github.ref) }} + cancel-in-progress: true + steps: + - uses: actions/checkout@v5 + with: + # Ensure we are building the branch and not the branch after being merged on develop + # https://github.com/actions/checkout/issues/881 + ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.ref }} + - name: Add SSH private keys for submodule repositories + uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1 + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }} + with: + ssh-private-key: ${{ secrets.ELEMENT_ENTERPRISE_DEPLOY_KEY }} + - name: Clone submodules + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == 'element-hq/element-x-android' }} + run: git submodule update --init --recursive + - name: Use JDK 21 + uses: actions/setup-java@v5 + with: + distribution: 'temurin' # See 'Supported distributions' for available options + java-version: '21' + - name: Configure gradle + uses: gradle/actions/setup-gradle@v5 + with: + cache-read-only: ${{ github.ref != 'refs/heads/develop' }} + - name: Run compose tests + run: ./tools/compose/check_stability.sh + lint: name: Android lint check runs-on: ubuntu-latest