-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [CI] Implement SonarCloud * [CI] Implement JaCoCo test coverage * [CI] Implement Kover test coverage --------- Co-authored-by: Aleksandar Apostolov <[email protected]>
- Loading branch information
1 parent
533611c
commit c5db8fa
Showing
21 changed files
with
701 additions
and
77 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'Gradle Cache' | ||
description: 'Cache Gradle Build Cache to improve workflow execution time' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- |
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,10 @@ | ||
name: 'Setup Java' | ||
description: 'Setup Java' | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: adopt | ||
java-version: 17 |
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: 'Setup Ruby' | ||
description: 'Setup Ruby and cache bundler' | ||
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 |
---|---|---|
|
@@ -3,15 +3,24 @@ name: Android CI | |
on: | ||
push: | ||
branches: [ main ] | ||
|
||
pull_request: | ||
branches: | ||
- '**' | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
BUILD_CACHE_AWS_REGION: ${{ secrets.BUILD_CACHE_AWS_REGION }} | ||
BUILD_CACHE_AWS_BUCKET: ${{ secrets.BUILD_CACHE_AWS_BUCKET }} | ||
BUILD_CACHE_AWS_ACCESS_KEY_ID: ${{ secrets.BUILD_CACHE_AWS_ACCESS_KEY_ID }} | ||
BUILD_CACHE_AWS_SECRET_KEY: ${{ secrets.BUILD_CACHE_AWS_SECRET_KEY }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_PR_NUM: ${{ github.event.pull_request.number }} | ||
|
||
jobs: | ||
lint: | ||
|
@@ -20,11 +29,7 @@ jobs: | |
steps: | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
- name: Set up JDK | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- uses: ./.github/actions/setup-java | ||
- name: spotless | ||
run: ./gradlew spotlessCheck --scan | ||
|
||
|
@@ -34,11 +39,7 @@ jobs: | |
steps: | ||
- name: Check out code | ||
uses: actions/[email protected] | ||
- name: Set up JDK | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- uses: ./.github/actions/setup-java | ||
- name: API check | ||
run: ./gradlew apiCheck --scan | ||
|
||
|
@@ -47,21 +48,9 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: set up JDK | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- uses: ./.github/actions/setup-java | ||
|
||
- name: Cache Gradle and wrapper | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: ./.github/actions/gradle-cache | ||
|
||
- name: Make Gradle executable | ||
run: chmod +x ./gradlew | ||
|
@@ -79,26 +68,14 @@ jobs: | |
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: set up JDK | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- uses: ./.github/actions/setup-java | ||
|
||
- name: Cache Gradle and wrapper | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.gradle/caches | ||
~/.gradle/wrapper | ||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | ||
restore-keys: | | ||
${{ runner.os }}-gradle- | ||
- uses: ./.github/actions/gradle-cache | ||
|
||
- name: Run unit tests | ||
run: | | ||
./gradlew :stream-video-android-ui-compose:testDebugUnitTest --scan --stacktrace | ||
./gradlew :stream-video-android-core:testDebugUnitTest --scan --stacktrace | ||
./gradlew :stream-video-android-ui-compose:koverXmlReport --scan --stacktrace | ||
./gradlew :stream-video-android-core:koverXmlReport --scan --stacktrace | ||
- name: Unit tests core results | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -112,21 +89,26 @@ jobs: | |
name: unit-tests-compose-results | ||
path: stream-video-android-ui-compose/build/reports/tests/testDebugUnitTest/index.html | ||
|
||
- uses: ./.github/actions/setup-ruby | ||
|
||
- name: Sonar | ||
run: bundle exec fastlane run_sonar_analysis | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
|
||
androidTest-GMD: | ||
name: Android Test with GMD | ||
if: ${{ false }} # disable for now | ||
runs-on: macOS-latest | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 55 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
- uses: ./.github/actions/setup-java | ||
|
||
- uses: ./.github/actions/enable-kvm | ||
|
||
# Sets gradle up | ||
- name: Setup Gradle | ||
|
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
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
branches: | ||
- develop | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish: | ||
name: Snapshot build and publish | ||
|
@@ -14,11 +14,7 @@ jobs: | |
- name: Check out code | ||
uses: actions/[email protected] | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- uses: ./.github/actions/setup-java | ||
|
||
- name: Release build | ||
# assembleRelease for all modules, excluding non-library modules: samples, docs | ||
|
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 |
---|---|---|
|
@@ -16,11 +16,7 @@ jobs: | |
# with: | ||
# ref: release | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- uses: ./.github/actions/setup-java | ||
|
||
- name: Release build | ||
# assembleRelease for all modules, excluding non-library modules: samples, docs | ||
|
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 |
---|---|---|
|
@@ -15,11 +15,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
ref: main | ||
- name: Set up JDK 17 | ||
uses: actions/[email protected] | ||
with: | ||
distribution: adopt | ||
java-version: 17 | ||
- uses: ./.github/actions/setup-java | ||
- name: Generate Dokka HTML docs | ||
run: ./gradlew dokkaHtmlMultimodule | ||
- name: Deploy to GitHub pages | ||
|
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.