-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from treosh/feature/output-manifest
Add fileSystemStoragePath
- Loading branch information
Showing
32 changed files
with
16,496 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Example of output usage | ||
name: LHCI-output-webhook | ||
on: push | ||
jobs: | ||
output-webhook: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use output for sending data to API. | ||
id: LHCIAction | ||
uses: ./ | ||
with: | ||
urls: | | ||
https://treo.sh/ | ||
- name: Webhook | ||
uses: denar90/[email protected] | ||
with: | ||
webhookUrl: ${{secrets.ACTION_WEBHOOK_URL}} | ||
data: '{ "links": ${{steps.LHCIAction.outputs.links}}, "manifest": ${{steps.LHCIAction.outputs.manifest}} }' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -394,6 +394,37 @@ Add a plugin as a dependency, so it's installed locally: | |
|
||
</details> | ||
|
||
<details> | ||
<summary>Use `output` for a powerful composition with other actions</summary><br> | ||
|
||
#### main.yml | ||
|
||
```yml | ||
# Example of output usage | ||
name: LHCI-output-webhook | ||
on: push | ||
jobs: | ||
output-webhook: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use output for sending data to API. | ||
id: LHCIAction | ||
uses: ./ | ||
with: | ||
urls: | | ||
https://treo.sh/ | ||
- name: Webhook | ||
uses: denar90/[email protected] | ||
with: | ||
webhookUrl: ${{secrets.ACTION_WEBHOOK_URL}} | ||
data: '{ "links": ${{steps.LHCIAction.outputs.links}}, "manifest": ${{steps.LHCIAction.outputs.manifest}} }' | ||
``` | ||
|
||
[⚙️ See this workflow in use](https://github.com/treosh/lighthouse-ci-action/actions?workflow=LHCI-output-webhook) | ||
|
||
</details> | ||
|
||
Explore more workflows in [public examples](./.github/workflows). | ||
Submit a pull request with a new one if they don't cover your use case. | ||
|
||
|
@@ -473,6 +504,69 @@ serverToken: ${{ secrets.LHCI_SERVER_TOKEN }} | |
|
||
> **Note**: Use [Github secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets#creating-encrypted-secrets) to keep your token hidden! | ||
|
||
## Outputs | ||
|
||
### `resultsPath` | ||
|
||
Server path to results stored results. | ||
|
||
Example | ||
|
||
``` | ||
/Users/lighthouse-ci-action/.lighthouseci | ||
``` | ||
### `links` | ||
Stored results links. | ||
Example: | ||
```js | ||
{ | ||
'https://treo.sh/': 'https://storage.googleapis.com/lighthouse-infrastructure.appspot.com/reports/1593981455963-59854.report.html' | ||
... | ||
} | ||
``` | ||
|
||
### `assertionResults` | ||
|
||
```js | ||
;[ | ||
{ | ||
name: 'maxNumericValue', | ||
expected: 61440, | ||
actual: 508455, | ||
values: [508455], | ||
operator: '<=', | ||
passed: false, | ||
auditProperty: 'total.size', | ||
auditId: 'resource-summary', | ||
level: 'error', | ||
url: 'https://treo.sh/', | ||
auditTitle: 'Keep request counts low and transfer sizes small', | ||
auditDocumentationLink: 'https://developers.google.com/web/tools/lighthouse/audits/budgets', | ||
}, | ||
... | ||
] | ||
``` | ||
|
||
### `manifest` | ||
|
||
Report results. Lighthouse-CI doc [reference](https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/configuration.md#outputdir). | ||
|
||
```js | ||
;[ | ||
{ | ||
url: 'https://treo.sh/', | ||
isRepresentativeRun: true, | ||
htmlPath: '/Users/lighthouse-ci-action/.lighthouseci/treo_sh-_-2020_07_05_20_37_18.report.html', | ||
jsonPath: '/Users/lighthouse-ci-action/.lighthouseci/treo_sh-_-2020_07_05_20_37_18.report.json', | ||
summary: { performance: 0.99, accessibility: 0.98, 'best-practices': 1, seo: 0.96, pwa: 0.71 }, | ||
}, | ||
] | ||
``` | ||
|
||
--- | ||
|
||
## Credits | ||
|
19 changes: 19 additions & 0 deletions
19
node_modules/@lhci/cli/node_modules/@lhci/utils/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.