Skip to content

Commit

Permalink
Merge pull request #21 from catchpoint/update_packages
Browse files Browse the repository at this point in the history
Update to latest api wrapper
  • Loading branch information
claud-io authored Apr 19, 2024
2 parents 94404e3 + 42c8f7a commit 33dad2f
Show file tree
Hide file tree
Showing 944 changed files with 275,159 additions and 144,064 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v2

- name: WebPageTest
uses: WPO-Foundation/webpagetest-github-action@main
- name: WebPageTest
uses: catchpoint/WebPageTest.github-action@main
with:
apiKey: ${{ secrets.WPT_API_KEY }}
urls: |
Expand Down Expand Up @@ -62,7 +62,7 @@ The tests will be run with the following WebPageTest settings:
However, WebPageTest is capable of going _very_ deep, and the GitHub Action provides a number of configuration settings to help fine-tune your tests and even fail a pull request if performance budgets aren't met.

### Setting performance budgets
WebPageTest's GitHub Action uses the [WebPageTest API Wrapper for NodeJS](https://github.com/marcelduran/webpagetest-api) under the hood. The wrapper provides [test specs](https://github.com/marcelduran/webpagetest-api/wiki/Test-Specs) functionality that lets you set budgets on any of the metrics returned by the WebPageTest API.
WebPageTest's GitHub Action uses the [WebPageTest API Wrapper for NodeJS](https://github.com/catchpoint/WebPageTest.api-nodejs) under the hood. The wrapper provides [test specs](https://github.com/catchpoint/WebPageTest.api-nodejs/wiki/Test-Specs) functionality that lets you set budgets on any of the metrics returned by the WebPageTest API.

The GitHub Action lets you provide a path to a specs JSON file using the `budget` input. If a specs file is included, WebPageTest's GitHub Action will test the results against the budgets you've defined. If any budget isn't met, the tests will fail and you'll be provided with links to dig into the full WebPageTest results to see what was slowing things down.

Expand All @@ -80,7 +80,7 @@ jobs:
uses: actions/checkout@v2
- name: WebPageTest
uses: WPO-Foundation/webpagetest-github-action@main
uses: catchpoint/WebPageTest.github-action@main
with:
apiKey: ${{ secrets.WPT_API_KEY }}
urls: |
Expand All @@ -106,7 +106,7 @@ WebPageTest would test each run's First Contentful Paint. If the First Contentfu

![Example of a WPT action failing the PR if a budget is exceeded](/images/wpt-action-fail-pr.png)

The specs format provides tremendous flexiblity in which metrics you want to budget against. For more information, check out [the official documentation](https://github.com/marcelduran/webpagetest-api/wiki/Test-Specs).
The specs format provides tremendous flexiblity in which metrics you want to budget against. For more information, check out [the official documentation](https://github.com/catchpoint/WebPageTest.api-nodejs/wiki/Test-Specs).

### Testing against a deployment URL
If you are going to set and enforce performance budgets, **make sure to pass a preview URL** to test against to make sure that you're testing against the latest changes, not against a prior version of your site.
Expand All @@ -131,7 +131,7 @@ jobs:
site_name: 'your-netlify-site-name'
- name: WebPageTest
uses: WPO-Foundation/webpagetest-github-action@main
uses: catchpoint/WebPageTest.github-action@main
with:
apiKey: ${{ secrets.WPT_API_KEY }}
urls: |
Expand All @@ -149,7 +149,7 @@ _If you are testing against a Netlify deployment preview, it's important to note
```
### Customizing your WebPageTest tests
There are a _lot_ of [options available in WebPageTest](https://github.com/marcelduran/webpagetest-api#test-works-for-runtest-method-only) to customize your test results, record custom metrics, or do advanced scripting and multi-page flows.
There are a _lot_ of [options available in WebPageTest](https://github.com/catchpoint/WebPageTest.api-nodejs#test-works-for-runtest-method-only) to customize your test results, record custom metrics, or do advanced scripting and multi-page flows.
To give you the ability to customize you tests, the WebPageTest GitHub Action let's you provide the path to a JSON object with your test options, using the `wptOptions` input.
Expand All @@ -167,7 +167,7 @@ jobs:
uses: actions/checkout@v2
- name: WebPageTest
uses: WPO-Foundation/webpagetest-github-action@main
uses: catchpoint/WebPageTest.github-action@main
with:
apiKey: ${{ secrets.WPT_API_KEY }}
urls: |
Expand Down
26 changes: 13 additions & 13 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: 'WebPageTest GitHub Action'
author: 'WebPageTest'
description: 'Automatically test code changes in WebPageTest and enforce performance budgets'
name: "WebPageTest GitHub Action"
author: "WebPageTest"
description: "Automatically test code changes in WebPageTest and enforce performance budgets"
inputs:
apiKey:
description: 'WebPageTest API Token'
description: "WebPageTest API Token"
required: true
urls:
description: 'List of URL(s) to test'
description: "List of URL(s) to test"
required: true
budget:
description: 'Path to WebPageTest testspecs.json file'
description: "Path to WebPageTest testspecs.json file"
required: false
label:
description: 'Label for test (shows up in WebPageTest)'
description: "Label for test (shows up in WebPageTest)"
required: false
wptOptions:
description: 'Path to JSON file with WebPageTest test options (see https://github.com/marcelduran/webpagetest-api#test-works-for-runtest-method-only)'
description: "Path to JSON file with WebPageTest test options (see https://github.com/marcelduran/webpagetest-api#test-works-for-runtest-method-only)"
required: false
GITHUB_TOKEN:
description: 'Secret GitHub Token (automatically provided by GitHub)'
description: "Secret GitHub Token (automatically provided by GitHub)"
default: ${{ github.token }}
runs:
using: 'node12'
main: 'index.js'
using: "node12"
main: "index.js"
branding:
icon: 'bar-chart-2'
color: 'blue'
icon: "bar-chart-2"
color: "blue"
1 change: 0 additions & 1 deletion node_modules/.bin/_mocha

This file was deleted.

12 changes: 12 additions & 0 deletions node_modules/.bin/_mocha

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/ejs

This file was deleted.

12 changes: 12 additions & 0 deletions node_modules/.bin/ejs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/flat

This file was deleted.

12 changes: 12 additions & 0 deletions node_modules/.bin/flat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/he

This file was deleted.

12 changes: 12 additions & 0 deletions node_modules/.bin/he

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/jake

This file was deleted.

12 changes: 12 additions & 0 deletions node_modules/.bin/jake

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/js-yaml

This file was deleted.

12 changes: 12 additions & 0 deletions node_modules/.bin/js-yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/mocha

This file was deleted.

12 changes: 12 additions & 0 deletions node_modules/.bin/mocha

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node_modules/.bin/mocha.cmd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions node_modules/.bin/mocha.ps1

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion node_modules/.bin/nanoid

This file was deleted.

17 changes: 0 additions & 17 deletions node_modules/.bin/nanoid.cmd

This file was deleted.

28 changes: 0 additions & 28 deletions node_modules/.bin/nanoid.ps1

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/node-which

This file was deleted.

17 changes: 0 additions & 17 deletions node_modules/.bin/node-which.cmd

This file was deleted.

28 changes: 0 additions & 28 deletions node_modules/.bin/node-which.ps1

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/webpagetest

This file was deleted.

12 changes: 12 additions & 0 deletions node_modules/.bin/webpagetest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 33dad2f

Please sign in to comment.