Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add workflows #2

Merged
merged 5 commits into from
Sep 20, 2022
Merged

add workflows #2

merged 5 commits into from
Sep 20, 2022

Conversation

yshrsmz
Copy link
Contributor

@yshrsmz yshrsmz commented Sep 20, 2022

tested on my repo

@@ -0,0 +1,49 @@
name: Pull Request
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be a bit faster than Bitrise, but the on-push workflow takes more than I imagined.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, but subsequent runs should be faster as I've added cache step...

@@ -0,0 +1,85 @@
name: Build & Integration tests
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


androidTest:
needs: build
runs-on: macos-latest # enables hardware acceleration in the virtual machine
Copy link
Contributor Author

@yshrsmz yshrsmz Sep 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to use macos to run instrumentation test

ReactiveCircus/android-emulator-runner#46

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -8,7 +11,9 @@ plugins {
}

def properties = new Properties()
properties.load(rootProject.file('local.properties').newDataInputStream())
if (Files.exists(Paths.get("$rootProject.rootDir/local.properties"))) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in CI environment, we don't have local.properties so added a check.
should be fine because all necessary variables are provided via environment variables.

@@ -0,0 +1,16 @@
root=true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I forgot to add this in #1

name: bucketeer-build-reports
path: bucketeer/build/reports

androidTest:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow for the main branch will run both unit tests and integration tests

run: ./gradlew assemble --stacktrace

- name: Run Bucketeer unit tests
run: ./gradlew :bucketeer:testDebugUnitTest --stacktrace
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The workflow for pull-request will run lint, assemble, and unit tests. Integration tests will be executed on main branch.

@yshrsmz yshrsmz requested a review from cre8ivejp September 20, 2022 12:33
~/.android/adb*
key: avd-29
- name: Run instrumentation tests
uses: reactivecircus/android-emulator-runner@v2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to switch to Gradle Managed Device once we update AGP to 7.3.x
GMD should be much more reliable.

https://developer.android.com/studio/test/gradle-managed-devices

android/sunflower#785
android/nowinandroid#210

Comment on lines +9 to +11
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI build on a pull request will be canceled if you push a new commit to the branch.

Copy link
Member

@cre8ivejp cre8ivejp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finally, we can migrate all SDK CIs to the same platform :)
Thank you!

@yshrsmz
Copy link
Contributor Author

yshrsmz commented Sep 20, 2022

Thanks!

@yshrsmz yshrsmz merged commit 5371a30 into bucketeer-io:main Sep 20, 2022
@yshrsmz yshrsmz deleted the actions branch September 20, 2022 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants