Home

Awesome

⚠️ Deprecated!

Since webpagetest has a paid business model now you may want to checkout their official github action. You can still use this action if you have a valid WebPageTest API key or set up your own WebPageTest instance

WebPageTest GitHub Action

All Contributors

⚡️🚀 GitHub Action to print webPageTest.org results as a commit comment after a push.

<p></p> <details> <summary> Click to see example commit comment </summary> <p align="center"> <img alt="example image" src="https://github.com/JCofman/webPagetestAction/blob/master/example.png"/> </p> </details> <p></p>

Make sure to pass a WEBPAGETEST_API_KEY which you can get here and a TEST_URL.

Secrets

Environment Variables

Args

You should be able to provide custom args as mentioned in the marcelduran/webpagetest-api under the Test (works for test command only) section.

Examples

on: push
name: Run Webpagetest
jobs:
  webPageTestActions:
    name: WebPageTestActions
    runs-on: ubuntu-latest
    steps:
      - uses: JCofman/webPagetestAction@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          TEST_URL: https://example.com
          WEBPAGETEST_API_KEY: ${{ secrets.WEBPAGETEST_API_KEY }}

With self hosted WebPagetest server

on: push
name: Run Webpagetest
jobs:
  webPageTestActions:
    name: WebPageTestActions
    runs-on: ubuntu-latest
    steps:
      - uses: JCofman/webPagetestAction@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          TEST_URL: https://example.com
          WEBPAGETEST_API_KEY: ${{ secrets.WEBPAGETEST_API_KEY }}
          WEBPAGETEST_SERVER_URL: www.your-custom-server.org

When you use the default action without any custom arguments some defaults will be set:

        location: "Dulles_MotoG4", // <location> string to test from https://www.webpagetest.org/getLocations.php?f=html
        connectivity:  "3GSlow", // <profile> string: connectivity profile -- requires location to be specified -- (Cable|DSL|3GSlow|3G|3GFast|4G|LTE|Edge|2G|Dial|FIOS|Native|custom) [Cable]
        runs: 3, // <number>: number of test runs [1]
        first: false, // skip the Repeat View test
        video: true, // capture video
        pollResults: 5, // <number>: poll results
        private: true, // keep the test hidden from the test log
        label: "Github Action", // <label>: string label for the test
        mobile: 1,
        device: "Motorola G (gen 4)",
        timeout: 10000,
        lighthouse: true,

You can provide your own custom args like the location and connectivity ⚠️ keep in mind that some devices locations and arguments don't work together ⚠️. You can find more details here

on: push
name: Run Webpagetest
jobs:
  webPageTestActions:
    name: WebPageTestActions
    runs-on: ubuntu-latest
    steps:
      - uses: JCofman/webPagetestAction@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          TEST_URL: https://example.com
          WEBPAGETEST_API_KEY: ${{ secrets.WEBPAGETEST_API_KEY }}
          WEBPAGETEST_SERVER_URL: www.your-custom-server.org
         with:
          args: location="Dulles_Nexus5" connectivity="DSL"

Contributors ✨

Thanks goes to these wonderful people (emoji key):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center"><a href="https://twitter.com/markusstaab"><img src="https://avatars2.githubusercontent.com/u/120441?v=4" width="100px;" alt=""/><br /><sub><b>Markus Staab</b></sub></a><br /><a href="https://github.com/JCofman/webPagetestAction/commits?author=staabm" title="Documentation">📖</a> <a href="#ideas-staabm" title="Ideas, Planning, & Feedback">🤔</a></td> <td align="center"><a href="https://jcofman.de"><img src="https://avatars2.githubusercontent.com/u/2118956?v=4" width="100px;" alt=""/><br /><sub><b>Jacob Cofman</b></sub></a><br /><a href="https://github.com/JCofman/webPagetestAction/commits?author=JCofman" title="Documentation">📖</a> <a href="https://github.com/JCofman/webPagetestAction/commits?author=JCofman" title="Code">💻</a> <a href="#example-JCofman" title="Examples">💡</a></td> <td align="center"><a href="https://github.com/boyum"><img src="https://avatars2.githubusercontent.com/u/9085189?v=4" width="100px;" alt=""/><br /><sub><b>Sindre Bøyum</b></sub></a><br /><a href="https://github.com/JCofman/webPagetestAction/commits?author=boyum" title="Code">💻</a></td> </tr> </table> <!-- markdownlint-enable --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the all-contributors specification. Contributions of any kind welcome!