-
Notifications
You must be signed in to change notification settings - Fork 274
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b85f643
commit 4e11fe9
Showing
21 changed files
with
1,037 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: 'Enable KVM' | ||
description: 'Enables hardware accelerated Android virtualization on Actions Linux larger hosted runners' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Enable KVM group perms | ||
shell: bash | ||
run: | | ||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | ||
sudo udevadm control --reload-rules | ||
sudo udevadm trigger --name-match=kvm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: 'Ruby Cache' | ||
description: 'Cache Ruby dependencies' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 3.1 | ||
bundler-cache: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ jobs: | |
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
distribution: adopt | ||
java-version: 17 | ||
- name: Unit tests | ||
run: ./scripts/ci-unit-tests.sh | ||
|
@@ -77,8 +77,8 @@ jobs: | |
with: | ||
artifact_path: ./stream-chat-android-ui-components-sample/build/outputs/apk/demo/debug/stream-chat-android-ui-components-sample-demo-debug.apk | ||
emerge_api_key: ${{ secrets.EMERGE_TOOLS_API_KEY }} | ||
build_type: debug | ||
build_type: debug | ||
|
||
size_check_compose: | ||
name: Size Check Compose | ||
runs-on: ubuntu-22.04 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: E2E Tests | ||
|
||
on: | ||
pull_request: | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_PR_NUM: ${{ github.event.pull_request.number }} | ||
|
||
jobs: | ||
build-apks: | ||
name: Build | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- uses: ./.github/actions/enable-kvm | ||
- uses: ./.github/actions/ruby-cache | ||
- uses: ./.github/actions/gradle-cache | ||
with: | ||
key-prefix: gradle-test | ||
- name: Build apks | ||
run: bundle exec fastlane build_e2e_test | ||
- name: Upload apks | ||
uses: actions/[email protected] | ||
with: | ||
name: apks | ||
path: | | ||
stream-chat-android-compose-sample/build/outputs/apk/e2e/debug/*.apk | ||
stream-chat-android-compose-sample/build/outputs/apk/androidTest/e2e/debug/*.apk | ||
allure_testops_launch: | ||
name: Launch Allure TestOps | ||
runs-on: ubuntu-24.04 | ||
needs: build-apks | ||
outputs: | ||
launch_id: ${{ steps.get_launch_id.outputs.launch_id }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/ruby-cache | ||
- name: Launch Allure TestOps | ||
run: bundle exec fastlane allure_launch | ||
env: | ||
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} | ||
GITHUB_EVENT: ${{ toJson(github.event) }} | ||
- id: get_launch_id | ||
run: echo "launch_id=${{env.LAUNCH_ID}}" >> $GITHUB_OUTPUT | ||
if: env.LAUNCH_ID != '' | ||
|
||
run-tests: | ||
name: Test | ||
runs-on: ubuntu-24.04 | ||
needs: | ||
- build-apks | ||
- allure_testops_launch | ||
env: | ||
LAUNCH_ID: ${{ needs.allure_testops_launch.outputs.launch_id }} | ||
steps: | ||
- name: Connect Bot | ||
uses: webfactory/[email protected] | ||
with: | ||
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
continue-on-error: true | ||
with: | ||
name: apks | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- uses: ./.github/actions/enable-kvm | ||
- uses: ./.github/actions/ruby-cache | ||
- uses: ./.github/actions/gradle-cache | ||
with: | ||
key-prefix: gradle-test | ||
- name: Run tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 34 | ||
disable-animations: true | ||
profile: pixel | ||
arch : x86_64 | ||
emulator-options: -no-snapshot-save -no-window -no-audio -no-boot-anim -gpu swiftshader_indirect -camera-back none -camera-front none | ||
script: bundle exec fastlane run_e2e_test | ||
- name: Allure TestOps Upload | ||
if: env.LAUNCH_ID != '' && (success() || failure()) | ||
run: bundle exec fastlane allure_upload launch_id:$LAUNCH_ID | ||
env: | ||
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} | ||
- name: Allure TestOps Launch Removal | ||
if: env.LAUNCH_ID != '' && cancelled() | ||
run: bundle exec fastlane allure_launch_removal launch_id:$LAUNCH_ID | ||
env: | ||
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }} | ||
- name: Upload test results | ||
uses: actions/[email protected] | ||
if: failure() | ||
with: | ||
name: test_report | ||
path: | | ||
./**/build/reports/androidTests/* | ||
fastlane/stream-chat-test-mock-server/logs/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,6 +32,7 @@ jobs: | |
- name: Detekt | ||
if: always() | ||
run: ./gradlew detekt | ||
|
||
vale: | ||
name: Vale doc linter | ||
runs-on: ubuntu-latest | ||
|
@@ -106,4 +107,12 @@ jobs: | |
if: failure() | ||
with: | ||
name: testDebugUnitTest | ||
path: ./**/build/reports/tests/testDebugUnitTest | ||
path: ./**/build/reports/tests/testDebugUnitTest | ||
|
||
rubocop: | ||
name: Rubocop | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: ./.github/actions/ruby-cache | ||
- run: bundle exec fastlane rubocop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" } | ||
|
||
gem 'fastlane', '2.225.0' | ||
gem 'json' | ||
gem 'rubocop', '1.38', group: :rubocop_dependencies | ||
gem 'sinatra', group: :sinatra_dependencies | ||
|
||
eval_gemfile('fastlane/Pluginfile') | ||
|
||
group :rubocop_dependencies do | ||
gem 'rubocop-performance' | ||
gem 'rubocop-require_tools' | ||
end | ||
|
||
group :sinatra_dependencies do | ||
gem 'eventmachine' | ||
gem 'faye-websocket' | ||
gem 'puma' | ||
gem 'rackup' | ||
end |
Oops, something went wrong.