Merge pull request #109 from nikhilbadyal/pr-checks

👷 Test all apps in PR checks
This commit is contained in:
Nikhil Badyal
2022-12-21 21:23:06 +05:30
committed by GitHub
5 changed files with 35 additions and 6 deletions
+3 -2
View File
@@ -15,7 +15,8 @@ jobs:
build-apk-pr-check: build-apk-pr-check:
uses: ./.github/workflows/build-artifact.yml uses: ./.github/workflows/build-artifact.yml
with: with:
FILES_TO_EXPECT: 3 FILES_TO_EXPECT: 16
secrets: secrets:
ENVS: | ENVS: |
PATCH_APPS=youtube_music,twitter CI_TEST=True
ES_JAVA_OPTS: '-Xms4g -Xmx4g'
+1 -1
View File
@@ -2,6 +2,6 @@
websiteURL = "https://t.me/revanced_apkss" websiteURL = "https://t.me/revanced_apkss"
websiteSummary = "Visit Revanced Builder Channel" websiteSummary = "Visit Revanced Builder Channel"
[website-music] ['website-music']
websiteURL = "https://t.me/revanced_apkss" websiteURL = "https://t.me/revanced_apkss"
websiteSummary = "Visit Revanced Builder Channel" websiteSummary = "Visit Revanced Builder Channel"
+5 -2
View File
@@ -5,7 +5,7 @@ from typing import Dict, List
from environs import Env from environs import Env
from requests import Session from requests import Session
from src.utils import default_build from src.utils import all_builds, default_build
class RevancedConfig: class RevancedConfig:
@@ -28,7 +28,10 @@ class RevancedConfig:
self.apk_pure = ["hex-editor"] self.apk_pure = ["hex-editor"]
self.apk_sos = ["expensemanager"] self.apk_sos = ["expensemanager"]
self.keystore_name = env.str("KEYSTORE_FILE_NAME", "revanced.keystore") self.keystore_name = env.str("KEYSTORE_FILE_NAME", "revanced.keystore")
self.apps = env.list("PATCH_APPS", default_build) self.ci_test = env.bool("CI_TEST", False)
self.apps = env.list(
"PATCH_APPS", all_builds if self.ci_test else default_build
)
self.extended_apps: List[str] = ["youtube", "youtube_music"] self.extended_apps: List[str] = ["youtube", "youtube_music"]
self.rip_libs_apps: List[str] = ["youtube"] self.rip_libs_apps: List[str] = ["youtube"]
self.normal_cli_jar = "revanced-cli.jar" self.normal_cli_jar = "revanced-cli.jar"
+8 -1
View File
@@ -64,6 +64,12 @@ class Parser(object):
except ValueError: except ValueError:
return False return False
def exclude_all_patches(self) -> None:
"""Exclude all patches to Speed up CI."""
for idx, item in enumerate(self._PATCHES):
if item == "-i":
self._PATCHES[idx] = "-e"
# noinspection IncorrectFormatting # noinspection IncorrectFormatting
def patch_app( def patch_app(
self, self,
@@ -107,7 +113,8 @@ class Parser(object):
logger.debug("Using experimental features") logger.debug("Using experimental features")
args.append("--experimental") args.append("--experimental")
args[1::2] = map(lambda i: self.config.temp_folder.joinpath(i), args[1::2]) args[1::2] = map(lambda i: self.config.temp_folder.joinpath(i), args[1::2])
if self.config.ci_test:
self.exclude_all_patches()
if self._PATCHES: if self._PATCHES:
args.extend(self._PATCHES) args.extend(self._PATCHES)
if ( if (
+18
View File
@@ -4,6 +4,24 @@ from typing import Dict
default_build = [ default_build = [
"youtube", "youtube",
] ]
all_builds = [
"youtube",
"youtube_music",
"twitter",
"reddit",
# "tiktok", # Commented because of out of memory issues
"warnwetter",
"spotify",
"nyx-music-player",
"icon_pack_studio",
"ticktick",
"twitch",
"hex-editor",
"citra",
"windy",
"my-expenses",
"backdrops",
]
possible_archs = ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] possible_archs = ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]