Skip to content

Commit ffb39ad

Browse files
committed
Update with speed section with GH actions guide
1 parent 53a206b commit ffb39ad

3 files changed

Lines changed: 74 additions & 24 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
"@biomejs/biome": "^2.2.2",
4646
"@playwright/test": "^1.55.0",
4747
"@types/bun": "^1.2.21",
48-
"endform": "^0.35.1"
48+
"endform": "^0.35.3"
4949
}
5050
}

‎pnpm-lock.yaml‎

Lines changed: 21 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎tutorial/stage-3-endform-integration/speeding-up-with-endform.mdx‎

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 4
66
---
77

8-
import { Aside } from '@astrojs/starlight/components';
8+
import { Aside, Tabs, TabItem } from '@astrojs/starlight/components';
99
import { Image } from "astro:assets";
1010
import TestTimeChart from "../../../assets/test-time-chart.png";
1111

@@ -80,4 +80,54 @@ Like:
8080
- How slow the slowest test is
8181
- How performant the app the tests are run against is
8282

83-
We think that we have the fastest Playwright test runner on the market, but we're really curious to hear what your experience in running Endform versus Playwright in your test suite is like.
83+
We think that we have the fastest Playwright test runner on the market, but we're really curious to hear what your experience in running Endform versus Playwright in your test suite is like.
84+
85+
## Running in CI
86+
87+
Let's make a CI workflow that runs the tests with Endform.
88+
89+
<Tabs>
90+
<TabItem label=".github/workflows/e2e-tests.yml">
91+
```yaml
92+
name: Endform tests on main
93+
94+
on:
95+
repository_dispatch:
96+
types:
97+
- 'vercel.deployment.success'
98+
99+
jobs:
100+
e2e-tests:
101+
timeout-minutes: 5
102+
runs-on: ubuntu-latest
103+
steps:
104+
- name: Checkout code
105+
uses: actions/checkout@v4
106+
107+
- name: Set up pnpm
108+
uses: pnpm/action-setup@v4
109+
110+
- name: Setup Node.js
111+
uses: actions/setup-node@v4
112+
with:
113+
node-version: lts/*
114+
cache: 'pnpm'
115+
116+
- name: Install dependencies
117+
run: pnpm install
118+
119+
- name: Run Playwright tests with Endform
120+
run: npx endform@latest test
121+
env:
122+
ENDFORM_API_KEY: ${{ secrets.ENDFORM_API_KEY }}
123+
```
124+
</TabItem>
125+
</Tabs>
126+
127+
Here we used the [`repository_dispatch` event](https://vercel.com/docs/git/vercel-for-github#repository-dispatch-events) to trigger the workflow when the Vercel deployment is successful.
128+
129+
Some other thigns you could try are:
130+
131+
- Just trigger on commits to the main branch
132+
- Triggering on pull requests
133+
- Sending a message to a Slack channel when the tests are successful or fail

0 commit comments

Comments
 (0)