diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml new file mode 100644 index 0000000..5efe870 --- /dev/null +++ b/.github/workflows/lighthouse.yml @@ -0,0 +1,16 @@ +name: Lighthouse CI with a plugin +on: push +jobs: + lighthouse: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install # install dependencies, that includes Lighthouse plugins + - name: Audit URLs with Field Performance Plugin + uses: treosh/lighthouse-ci-action@v9 + with: + urls: | + https://firstcontributions.github.io + https://github.com/firstcontributions/first-contributions + configPath: 'lighthouserc.json' + temporaryPublicStorage: true diff --git a/lighthouserc.json b/lighthouserc.json new file mode 100644 index 0000000..a9f03b3 --- /dev/null +++ b/lighthouserc.json @@ -0,0 +1,9 @@ +{ + "ci": { + "collect": { + "settings": { + "plugins": ["lighthouse-plugin-field-performance"] + } + } + } +} diff --git a/package.json b/package.json index a224645..cb403fe 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "@rollup/plugin-commonjs": "^11.0.0", "@rollup/plugin-node-resolve": "^6.0.0", "jest": "^26.0.1", + "lighthouse-plugin-field-performance": "^3.0.0", "rollup": "^1.20.0", "rollup-plugin-livereload": "^1.0.0", "rollup-plugin-svelte": "^5.0.3", diff --git a/yarn.lock b/yarn.lock index 8e15754..adf4cc6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -858,6 +858,11 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" +before-after-hook@^2.2.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.2.tgz#a6e8ca41028d90ee2c24222f201c90956091613e" + integrity sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ== + binary-extensions@^1.0.0: version "1.13.1" resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65" @@ -1160,6 +1165,11 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +data-uri-to-buffer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz#b5db46aea50f6176428ac05b73be39a57701a64b" + integrity sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA== + data-urls@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" @@ -1235,6 +1245,11 @@ delayed-stream@~1.0.0: resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= +deprecation@^2.0.0, deprecation@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919" + integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ== + detect-newline@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -2482,6 +2497,14 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lighthouse-plugin-field-performance@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lighthouse-plugin-field-performance/-/lighthouse-plugin-field-performance-3.0.0.tgz#5924e2dce4ff807388b2ca3cb840a0e8d4ea3104" + integrity sha512-6DfS0e3Nte9XT7ygDh19BKs2Cr8VeulBILUuz/pUqVgq5osh1lwGzpjAgf+pDRWDLmUsgsuLJEEtO8+xKMZwng== + dependencies: + lodash "^4.17.21" + node-fetch "^2.6.1" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -2518,6 +2541,11 @@ lodash@^4.17.13, lodash@^4.17.15: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.19.tgz#e48ddedbe30b3321783c5b4301fbd353bc1e4a4b" integrity sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ== +lodash@^4.17.21: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + magic-string@^0.25.2: version "0.25.6" resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.25.6.tgz#5586387d1242f919c6d223579cc938bf1420795e"