Skip to content

Commit

Permalink
add budgets - attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish authored May 6, 2020
1 parent 7189151 commit 057430a
Showing 1 changed file with 46 additions and 3 deletions.
49 changes: 46 additions & 3 deletions build-tracker.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,55 @@
const withPostgres = require('@build-tracker/plugin-with-postgres').default;
const { BudgetLevel, BudgetType } = require('@build-tracker/types');

module.exports = withPostgres({
artifacts: {},
artifacts: {
// https://buildtracker.dev/docs/budgets
budgets: {
'*': [
{
level: BudgetLevel.ERROR,
sizeKey: 'stat',
type: BudgetType.PERCENT_DELTA,
maximum: 0.05,
},
],
"dist/extension-chrome/scripts/popup-bundle.js": [{
level: BudgetLevel.WARN,
sizeKey: 'stat',
type: BudgetType.SIZE,
maximum: 15000,
}],
"dist/lightrider/lighthouse-lr-bundle.js": [{
level: BudgetLevel.WARN,
sizeKey: 'stat',
type: BudgetType.SIZE,
maximum: 1500000,
}],
"dist/viewer/src/viewer.js": [{
level: BudgetLevel.WARN,
sizeKey: 'stat',
type: BudgetType.SIZE,
maximum: 65000,
}],
"dist/lighthouse-dt-bundle.js": [{
level: BudgetLevel.WARN,
sizeKey: 'stat',
type: BudgetType.SIZE,
maximum: 470000,
}],
"dist/lightrider/report-generator-bundle.js": [{
level: BudgetLevel.WARN,
sizeKey: 'stat',
type: BudgetType.SIZE,
maximum: 50000,
}]
},
},
defaultBranch: process.env.BT_DEFAULT_BRANCH,
pg: {
connectionString: process.env.DATABASE_URL,
ssl: true
ssl: true,
},
port: process.env.PORT,
url: process.env.BT_URL
url: process.env.BT_URL,
});

0 comments on commit 057430a

Please sign in to comment.