Skip to content

Commit f86ff17

Browse files
gabrielmferncursoragenta-carciu
authored
feat(ci): split script and workflow for e2e test (#887)
Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Anxhela Carciu <carciu.94anxhela@outlook.com>
1 parent 264bfde commit f86ff17

File tree

11 files changed

+40
-8
lines changed

11 files changed

+40
-8
lines changed

.github/workflows/e2e.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: E2E Tests
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- canary
7+
pull_request:
8+
permissions:
9+
contents: read
10+
pull-requests: read
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
jobs:
15+
e2e:
16+
runs-on: buildjet-4vcpu-ubuntu-2204
17+
container:
18+
image: node:24-slim
19+
# credentials:
20+
# username: ${{ vars.DOCKER_HUB_USERNAME || '' }}
21+
# password: ${{ secrets.DOCKER_HUB_API_KEY || '' }}
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
25+
- name: pnpm setup
26+
uses: pnpm/action-setup@9b5745cdf0a2e8c2620f0746130f809adb911c19
27+
- name: Install packages
28+
run: pnpm install
29+
- name: Run build
30+
run: pnpm build
31+
- name: Run E2E Tests
32+
run: pnpm test:e2e
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import fs from 'node:fs';
33
import os from 'node:os';
44
import path from 'node:path';
55

6-
describe('integrations', () => {
6+
describe('e2e', () => {
77
const sdkPath = path.resolve(__dirname, '..');
88

99
beforeAll(() => {

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
},
3232
"scripts": {
3333
"build": "tsdown src/index.ts --format esm,cjs --dts",
34-
"integration:nextjs": "cd ./integrations/nextjs && next build --turbopack",
34+
"integration:nextjs": "cd ./e2e/nextjs && next build --turbopack",
3535
"lint": "biome check .",
3636
"lint:fix": "biome check . --write",
3737
"prepublishOnly": "pnpm run build",
38-
"test": "vitest run",
39-
"test:dev": "cross-env TEST_MODE=dev vitest run",
40-
"test:integrations": "vitest run integrations",
41-
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run",
42-
"test:watch": "vitest",
38+
"test": "vitest run --exclude e2e",
39+
"test:dev": "cross-env TEST_MODE=dev vitest run --exclude e2e",
40+
"test:e2e": "vitest run e2e",
41+
"test:record": "rimraf --glob \"**/__recordings__\" && cross-env TEST_MODE=record vitest run --exclude e2e",
42+
"test:watch": "vitest --exclude e2e",
4343
"typecheck": "tsc --noEmit"
4444
},
4545
"repository": {

0 commit comments

Comments
 (0)