Skip to content

Commit

Permalink
improve basic example
Browse files Browse the repository at this point in the history
  • Loading branch information
alekseykulikov committed Nov 25, 2019
1 parent 514ca64 commit 1240c56
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 18 deletions.
17 changes: 0 additions & 17 deletions .github/workflows/LHCI-hermetic.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/LHCI-upload-artifact.yml
@@ -0,0 +1,19 @@
# This is a basic fully hermetic run of Lighthouse, that saves results as run artifacts.
name: LHCI-upload-artifact
on: push
jobs:
hermetic-basic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run Lighthouse on urls
uses: ./
with:
urls: |
https://example.com/
https://example.com/blog
- name: Save results
uses: actions/upload-artifact@v1
with:
name: lighthouse-results
path: '.lighthouseci'
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -43,7 +43,7 @@ jobs:
path: '.lighthouseci' # This will save the Lighthouse results as .json files
```

[⚙️ See this workflow in use](https://github.com/treosh/lighthouse-ci-action/actions?workflow=LHCI-hermetic)
[⚙️ See this workflow in use](https://github.com/treosh/lighthouse-ci-action/actions?workflow=LHCI-upload-artifact)

**Advanced example**: run Lighthouse audit for each unique deployment, test performance budgets, and save results to the [public storage](https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/cli.md#upload) for a quick debugging.

Expand Down Expand Up @@ -88,6 +88,8 @@ All results are private by default. Use this option to upload reports to LHCI's
temporaryPublicStorage: true
```

[⚙️ See an example workflow in use](https://github.com/treosh/lighthouse-ci-action/actions?workflow=LHCI-temporary-storage)

#### `runs` (default: 1)

Specify the number of runs to do on each URL.
Expand Down Expand Up @@ -133,6 +135,8 @@ upload.token: ${{ secrets.LHCI_TOKEN }}

Specify an API token for the LHCI server. [Learn how to generate a token](https://github.com/GoogleChrome/lighthouse-ci/blob/master/docs/getting-started.md#historical-reports--diffing-lighthouse-ci-server).

[⚙️ See an example workflow in use](https://github.com/treosh/lighthouse-ci-action/actions?workflow=LHCI-upload-to-private-server)

## Recipes

<details>
Expand Down

0 comments on commit 1240c56

Please sign in to comment.