Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 8 additions & 17 deletions .buildkite/commands/connected-tests.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
#!/bin/bash
#!/usr/bin/env bash

set -euo pipefail

echo "--- :closed_lock_with_key: Installing Secrets"
./gradlew applyConfiguration
echo "--- :robot_face: Starting Android emulator"
start-android-emulator \
--system-image "system-images;android-34;google_apis;arm64-v8a" \
--device "pixel_5" \
--logs-dir "build/emulator-logs"

echo -e "\n--- :gcloud: Logging into Google Cloud"
gcloud auth activate-service-account --key-file .configure-files/firebase.secrets.json

echo -e "\n--- :hammer_and_wrench: Building Tests"
./gradlew --stacktrace app:assembleDebug app:assembleDebugAndroidTest

echo -e "\n--- :firebase: Run Tests"
gcloud firebase test android run \
--project api-project-108380595987 \
--type instrumentation \
--app app/build/outputs/apk/debug/app-debug.apk \
--test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--device model=Nexus5X,version=26,locale=en,orientation=portrait \
--verbosity info
echo "--- :android: Running connected tests"
./gradlew --stacktrace :app:connectedDebugAndroidTest
7 changes: 6 additions & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@ steps:
- label: "Connected Tests"
key: "connected-test"
command: .buildkite/commands/connected-tests.sh
agents:
queue: mac-metal
Comment thread
mokagio marked this conversation as resolved.
Resolved
timeout_in_minutes: 30
plugins: [$CI_TOOLKIT]
artifact_paths:
- "aztec/build/test-results/**/*.xml"
- "app/build/reports/androidTests/connected/**/*"
- "app/build/outputs/androidTest-results/connected/**/*"
- "build/emulator-logs/**/*"

- label: "Publish :aztec"
key: "publish-aztec"
Expand Down
11 changes: 0 additions & 11 deletions .configure

This file was deleted.

Binary file removed .configure-files/firebase.secrets.json.enc
Binary file not shown.
10 changes: 2 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ ktlint
# Dependencies
vendor

# Currently, the configure tool stores the encrypted files under
# .configure-files. Everything in that folder without a .enc extension should
# be ignored.
.configure-files/*
!.configure-files/*.enc

# Secrets files that should never be committed, regardless of location
# Legacy: nothing uses this secret anymore, but devs may still have a decrypted copy locally.
# Remove once they've had time to clean up: https://linear.app/a8c/issue/AINFRA-3580
firebase.secrets.json

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package org.wordpress.aztec.demo

import android.os.Build
import android.util.Log
import androidx.test.rule.GrantPermissionRule
import androidx.test.runner.AndroidJUnit4
Expand All @@ -12,8 +13,11 @@ import org.junit.runner.RunWith
abstract class BaseTest {
@Rule
@JvmField
val grantPermissionRule: GrantPermissionRule = GrantPermissionRule.grant(android.Manifest.permission.CAMERA,
android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
val grantPermissionRule: GrantPermissionRule = if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
GrantPermissionRule.grant(android.Manifest.permission.CAMERA)
} else {
GrantPermissionRule.grant(android.Manifest.permission.CAMERA, android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
}

companion object {
fun label(label: String) {
Expand Down
11 changes: 0 additions & 11 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

buildscript {
repositories {
maven { url "https://a8c-libs.s3.amazonaws.com/android" }
}
dependencies {
classpath 'com.automattic.android:configure:0.6.5'
}
}

plugins {
id "com.android.application" apply false
id "org.jetbrains.kotlin.android" apply false
Expand All @@ -35,8 +26,6 @@ allprojects {
}
}

apply plugin: 'com.automattic.android.configure'

task clean(type: Delete) {
delete rootProject.buildDir
}
Expand Down
Loading