1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Unbreak CI checks (#18813)

* Fix builds from forks
* bump coverage targets

---------

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
This commit is contained in:
legobeat 2023-04-26 11:14:33 +00:00 committed by GitHub
parent 086b7dade5
commit ef01dc1391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View File

@ -6,10 +6,10 @@
// subset of files to check against these targets. // subset of files to check against these targets.
module.exports = { module.exports = {
global: { global: {
lines: 69.3, lines: 69.92,
branches: 57, branches: 57.63,
statements: 68.5, statements: 69.24,
functions: 61.5, functions: 62.51,
}, },
transforms: { transforms: {
branches: 100, branches: 100,

View File

@ -110,10 +110,18 @@ const standardScuttlingConfig = {
* @returns {string} The Infura project ID. * @returns {string} The Infura project ID.
*/ */
function getInfuraProjectId({ buildType, variables, environment, testing }) { function getInfuraProjectId({ buildType, variables, environment, testing }) {
const EMPTY_PROJECT_ID = '00000000000000000000000000000000';
if (testing) { if (testing) {
return '00000000000000000000000000000000'; return EMPTY_PROJECT_ID;
} else if (environment !== ENVIRONMENT.PRODUCTION) { } else if (environment !== ENVIRONMENT.PRODUCTION) {
// Skip validation because this is unset on PRs from forks. // Skip validation because this is unset on PRs from forks.
// For forks, return empty project ID if we don't have one.
if (
!variables.isDefined('INFURA_PROJECT_ID') &&
environment === ENVIRONMENT.PULL_REQUEST
) {
return EMPTY_PROJECT_ID;
}
return variables.get('INFURA_PROJECT_ID'); return variables.get('INFURA_PROJECT_ID');
} }
/** @type {string|undefined} */ /** @type {string|undefined} */