{"id":21726974,"url":"https://github.com/wttech/gradle-lighthouse-plugin","last_synced_at":"2025-04-12T23:34:25.764Z","repository":{"id":45960438,"uuid":"211293391","full_name":"wttech/gradle-lighthouse-plugin","owner":"wttech","description":"Easily run Lighthouse tests on multiple sites with checking thresholds","archived":false,"fork":false,"pushed_at":"2021-11-24T10:14:58.000Z","size":280,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":11,"default_branch":"master","last_synced_at":"2023-03-12T05:02:12.381Z","etag":null,"topics":["best-practices","google-lighthouse","gradle","gradle-lighthouse-plugin","gradle-plugin","gradle-plugin-kotlin","lighthouse","performance","performance-testing","pwa","pwa-test","seo","seo-test","threshold"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wttech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-27T10:19:23.000Z","updated_at":"2022-11-01T03:15:38.000Z","dependencies_parsed_at":"2022-09-15T01:22:36.092Z","dependency_job_id":null,"html_url":"https://github.com/wttech/gradle-lighthouse-plugin","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wttech%2Fgradle-lighthouse-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wttech%2Fgradle-lighthouse-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wttech%2Fgradle-lighthouse-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wttech%2Fgradle-lighthouse-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wttech","download_url":"https://codeload.github.com/wttech/gradle-lighthouse-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226438817,"owners_count":17625107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["best-practices","google-lighthouse","gradle","gradle-lighthouse-plugin","gradle-plugin","gradle-plugin-kotlin","lighthouse","performance","performance-testing","pwa","pwa-test","seo","seo-test","threshold"],"created_at":"2024-11-26T03:42:55.423Z","updated_at":"2024-11-26T03:42:56.021Z","avatar_url":"https://github.com/wttech.png","language":"Kotlin","readme":"[![WTT logo](docs/wtt-logo.png)](https://www.wundermanthompson.com)\n\n[![Gradle Status](https://gradleupdate.appspot.com/Cognifide/gradle-lighthouse-plugin/status.svg?random=123)](https://gradleupdate.appspot.com/Cognifide/gradle-lighthouse-plugin/status)\n![Travis Build](https://travis-ci.org/Cognifide/gradle-lighthouse-plugin.svg?branch=master)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n\n# Gradle Lighthouse Plugin\n\nRuns [Lighthouse](https://developers.google.com/web/tools/lighthouse) tests on multiple sites / web pages with checking thresholds (useful on continuous integration, constant performance checking).\n\n[![Lighthouse Logo](docs/lighthouse-logo.png)](https://developers.google.com/web/tools/lighthouse)\n\n## Installation\n\n```kotlin\nplugins {\n    id(\"com.cognifide.lighthouse\") version \"1.0.0\"\n}\n```\n\n## Configuration\n\nPlugin organizes multiple sites to be tested into suites. Any web page could be checked with different threshold and Lighthouse configuration (e.g using [performance budgets](https://developers.google.com/web/tools/lighthouse/audits/budgets)).\nSuites need to be defined in file with following format:\n\n*lighthouse/suites.json* (plugin specific format)\n```json\n{\n  \"suites\": [\n    {\n      \"name\": \"site.demo\",\n      \"default\": true,\n      \"baseUrl\": \"http://demo.example.com\",\n      \"paths\": [\n        \"/en-us.html\",\n        \"/en-gb.html\"\n      ],\n      \"args\": [\n        \"--config-path=lighthouse/config.json\",\n        \"--performance=90\",\n        \"--accessibility=90\",\n        \"--best-practices=80\",\n        \"--seo=60\",\n        \"--pwa=30\"\n      ]\n    },\n    {\n      \"name\": \"site.live\",\n      \"baseUrl\": \"http://example.com\",\n      \"paths\": [\n        \"/en-us.html\"\n      ],\n      \"args\": [\n        \"--config-path=lighthouse/config.json\",\n        \"--performance=90\",\n        \"--accessibility=90\",\n        \"--best-practices=80\",\n        \"--seo=60\",\n        \"--pwa=30\"\n      ]\n    }\n  ]\n}\n```\n\nWhen using argument `--config-path` then it is also needed to have at least file:\n\n*lighthouse/config.json* ([documentation](https://github.com/GoogleChrome/lighthouse/blob/master/docs/configuration.md#config-extension))\n```json\n{\n  \"extends\": \"lighthouse:default\"\n}\n```\n\n## Running\n\nUnderneath, Gradle Lighthouse Plugin is running [Lighthouse CI](https://www.npmjs.com/package/lighthouse-ci) multiple times in case of test suites defined (support for multiple paths under same base URL). \n\nAvailable options:\n\n* run default suite(s): `sh gradlew lighthouseRun`,\n* run only desired suite(s) by name pattern(s): `sh gradlew lighthouseRun -Plighthouse.suite=site.demo` (if suites by name not found, default suites will be used),\n* run only desired suite(s) by base URL: `sh gradlew lighthouseRun -Plighthouse.baseUrl=http://example.com` (if suites by base URL not found, default suites will be used),\n* run only desired suite(s) with customized base URL: `sh gradlew lighthouseRun -Plighthouse.baseUrl=http://any-host.com -Plighthouse.suite=site.live`.\n\nNote that after running one of above commands first time, new files might be generated:\n\n* *package.json*\n* *yarn.lock*\n\nThis is indented behavior - __remember to save these files in VCS__.\nIf Lighthouse CI tool version need to be upgraded, just correct *package.json* file.\n\nAs a build result, reports under directory *build/lighthouse* will be generated:\n\n![Lighthouse Build Files](docs/lighthouse-build-output.png)\n\nScreenshot of sample report below:\n\n![Lighthouse Report](docs/lighthouse-report.png)\n\n## Building\n\n1. Clone this project using command `git clone https://github.com/wttech/gradle-lighthouse-plugin.git`\n2. To build plugin, simply enter cloned directory run command: `gradlew`\n3. To debug built plugin:\n    * Append to build command parameters `--no-daemon -Dorg.gradle.debug=true`\n    * Run build, it will suspend, then connect remote at port 5005 by using IDE\n    * Build will proceed and stop at previously set up breakpoint.\n\n## Contributing\n\nIssues reported or pull requests created will be very appreciated. \n\n1. Fork plugin source code using a dedicated GitHub button.\n2. Do code changes on a feature branch created from *develop* branch.\n3. Create a pull request with a base of *develop* branch.\n\n## License\n\n**Gradle Lighthouse Plugin** is licensed under the [Apache License, Version 2.0 (the \"License\")](https://www.apache.org/licenses/LICENSE-2.0.txt)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwttech%2Fgradle-lighthouse-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwttech%2Fgradle-lighthouse-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwttech%2Fgradle-lighthouse-plugin/lists"}