diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62f6d2243a5..20f62c1e9ce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -243,6 +243,7 @@ js_build: - *bundle_install - *yarn_production_install - bundle exec rake assets:precompile + - make lint_asset_bundle_size js_tests: stage: test diff --git a/Makefile b/Makefile index bdc5239fdee..ec1071a64f8 100644 --- a/Makefile +++ b/Makefile @@ -33,6 +33,7 @@ ARTIFACT_DESTINATION_FILE ?= ./tmp/idp.tar.gz lint_tracker_events \ lint_yaml \ lint_yarn_workspaces \ + lint_asset_bundle_size \ lintfix \ normalize_yaml \ optimize_assets \ @@ -113,6 +114,10 @@ lint_yaml: normalize_yaml ## Lints YAML files lint_yarn_workspaces: ## Lints Yarn workspace packages scripts/validate-workspaces.js +lint_asset_bundle_size: ## Lints JavaScript and CSS compiled bundle size + find app/assets/builds/application.css -size -350000c | grep . + find public/packs/js/application-*.digested.js -size -8000c | grep . + lint_migrations: scripts/migration_check