Add Android security Phase 0
This commit is contained in:
@@ -8,6 +8,8 @@ const packageJson = JSON.parse(fs.readFileSync(path.join(root, 'package.json'),
|
||||
const packageLock = JSON.parse(fs.readFileSync(path.join(root, 'package-lock.json'), 'utf8'));
|
||||
const androidBuild = fs.readFileSync(path.join(root, 'android', 'app', 'build.gradle'), 'utf8');
|
||||
const buildAll = fs.readFileSync(path.join(root, 'scripts', 'build-all.ps1'), 'utf8');
|
||||
const androidDebugScript = fs.readFileSync(path.join(root, 'scripts', 'build-android-apk.cjs'), 'utf8');
|
||||
const androidReleaseScript = fs.readFileSync(path.join(root, 'scripts', 'build-android-release-apk.cjs'), 'utf8');
|
||||
const desktopWorkflow = fs.readFileSync(path.join(root, '.github', 'workflows', 'desktop-build.yml'), 'utf8');
|
||||
|
||||
test('package metadata and lockfile share one release version', () => {
|
||||
@@ -32,3 +34,14 @@ test('release scripts and desktop artifact labels use package.json version', ()
|
||||
assert.match(desktopWorkflow, /require\('\.\/package\.json'\)\.version/);
|
||||
assert.match(desktopWorkflow, /-v\$\{\{ steps\.app-version\.outputs\.version \}\}/);
|
||||
});
|
||||
|
||||
test('Android debug APK is labeled as debug and release APK requires signing credentials', () => {
|
||||
assert.match(androidDebugScript, /assembleDebug/);
|
||||
assert.match(androidDebugScript, /ep-mail \$\{version\}-debug\.apk/);
|
||||
assert.match(androidReleaseScript, /assembleRelease/);
|
||||
assert.match(androidReleaseScript, /EP_MAIL_ANDROID_STORE_FILE/);
|
||||
assert.match(androidReleaseScript, /EP_MAIL_ANDROID_STORE_PASSWORD/);
|
||||
assert.match(androidReleaseScript, /EP_MAIL_ANDROID_KEY_ALIAS/);
|
||||
assert.match(androidReleaseScript, /EP_MAIL_ANDROID_KEY_PASSWORD/);
|
||||
assert.match(androidReleaseScript, /ep-mail \$\{version\}\.apk/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user