Skip to content

Commit cb9f2a7

Browse files
authored
Merge pull request #525 from Lemoncode/feature/#524-define-workflow-for-e2e
Define workflow in Github Actions for e2e test
2 parents 303c50a + 42d4fcf commit cb9f2a7

3 files changed

Lines changed: 27 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,27 @@ jobs:
2222
run: npm run tsc-check
2323
- name: Tests front
2424
run: npm test
25+
26+
e2e-tests:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v2
31+
32+
- name: Use Node.js 18.13.0
33+
uses: actions/setup-node@v2
34+
with:
35+
node-version: '18.13.0'
36+
cache: 'npm'
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Build
42+
run: npm run build
43+
44+
- name: Check TypeScript Types
45+
run: npm run tsc-check
46+
47+
- name: Run E2E tests
48+
run: npm run ci:e2e

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"test": "vitest",
1515
"prepare": "husky || \"No need to install husky\"",
1616
"tsc-check": "tsc --noEmit",
17-
"e2e": "playwright test --ui"
17+
"e2e": "playwright test --ui",
18+
"ci:e2e": "playwright test"
1819
},
1920
"dependencies": {
2021
"@lemoncode/fonk": "^1.5.4",

playwright.config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ export default defineConfig({
2626
use: { ...devices['Desktop Firefox'] },
2727
},
2828

29-
{
30-
name: 'webkit',
31-
use: { ...devices['Desktop Safari'] },
32-
},
33-
3429
/* Test against mobile viewports. */
3530
// {
3631
// name: 'Mobile Chrome',
@@ -54,6 +49,7 @@ export default defineConfig({
5449
/* Run your local dev server before starting the tests */
5550
webServer: {
5651
command: 'npm run dev',
52+
url: BASE_URL,
5753
reuseExistingServer: !process.env.CI,
5854
},
5955
});

0 commit comments

Comments
 (0)