Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/JCofman/webPagetestAction
β‘οΈπ Action to print webPagetest.org results
https://github.com/JCofman/webPagetestAction
actions performance performance-analysis webpagetest
Last synced: 3 months ago
JSON representation
β‘οΈπ Action to print webPagetest.org results
- Host: GitHub
- URL: https://github.com/JCofman/webPagetestAction
- Owner: JCofman
- License: mit
- Created: 2019-02-17T20:24:16.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T09:16:58.000Z (almost 2 years ago)
- Last Synced: 2024-10-01T07:33:08.344Z (4 months ago)
- Topics: actions, performance, performance-analysis, webpagetest
- Language: JavaScript
- Homepage: https://github.com/marketplace/actions/webpagetest-action
- Size: 1.52 MB
- Stars: 57
- Watchers: 2
- Forks: 7
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-actions - Runs a WebPageTest audit and prints the results as commit comment
- fucking-awesome-actions - Runs a WebPageTest audit and prints the results as commit comment
- awesome-workflows - Runs a WebPageTest audit and prints the results as commit comment
README
# β οΈ 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](https://docs.webpagetest.org/private-instances/)
- [Webpagetest official action](https://github.com/marketplace/actions/webpagetest-github-action)
## WebPageTest GitHub Action
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors)β‘οΈπ GitHub Action to print [webPageTest.org](https://www.webpagetest.org/) results as a commit comment after a push.
Click to see example commit comment
Make sure to pass a WEBPAGETEST_API_KEY which you can get [here](https://www.webpagetest.org/getkey.php) and a TEST_URL.
## Secrets
- GITHUB_TOKEN - Required GitHub token provided by actions to validate requests and make sure you are allowed to comment on the repo
- WEBPAGETEST_API_KEY - Required API key which you either can provide by your own hosted WebPageTest instance or can get here [here](https://www.webpagetest.org/getkey.php)## Environment Variables
- WEBPAGETEST_SERVER_URL - Optional By default this repo uses the awesome free WebPageTest `www.webpagetest.org` server offered by Akami but you can provide your own hosted version.
- TEST_URL - URL to run the audit e.g. `https://jcofman.de`## Args
You should be able to provide custom args as mentioned in the [marcelduran/webpagetest-api](https://github.com/marcelduran/webpagetest-api#test-works-for-test-command-only) under the `Test (works for test command only)` section.
## Examples
```yml
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
```yml
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:
```js
location: "Dulles_MotoG4", // string to test from https://www.webpagetest.org/getLocations.php?f=html
connectivity: "3GSlow", // 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 of test runs [1]
first: false, // skip the Repeat View test
video: true, // capture video
pollResults: 5, // : poll results
private: true, // keep the test hidden from the test log
label: "Github Action", // : 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](https://github.com/marcelduran/webpagetest-api#test-works-for-test-command-only)
```yml
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](https://allcontributors.org/docs/en/emoji-key)):
Markus Staab
π π€
Jacob Cofman
π π» π‘
Sindre BΓΈyum
π»
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!