Skip to content

Commit

Permalink
Try a netlify plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
eyeseast committed Nov 14, 2023
1 parent 8920dc6 commit 3608833
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
run: npx playwright test
env:
PLAYWRIGHT_TEST_BASE_URL: ${{ github.event.deployment_status.target_url }}
URL: ${{ github.event.deployment_status.target_url }}
2 changes: 2 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[[context.deploy-preview.plugins]]
package = "/plugins/test"
6 changes: 6 additions & 0 deletions plugins/test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// netlify plugin to run playwright on deploy previews

export async function onSuccess({ utils }) {
await utils.run("playwright", ["install"]);
await utils.run("playwright", ["test"]);
}
1 change: 1 addition & 0 deletions plugins/test/manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name: netlify-plugin-playwright

0 comments on commit 3608833

Please sign in to comment.