This commit is contained in:
Ibrahima G. Coulibaly
2024-06-28 16:25:24 +01:00
parent fdaaa2f1ba
commit 7bd8e4a349
3 changed files with 23 additions and 13 deletions

View File

@@ -9,7 +9,7 @@ on:
- main
jobs:
build-and-test:
test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
@@ -29,7 +29,7 @@ jobs:
- name: Build project
run: npm run build
playwright:
e2e-test:
name: 'Playwright Tests'
runs-on: ubuntu-latest
steps:
@@ -42,7 +42,7 @@ jobs:
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test:e2e:run
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
@@ -51,7 +51,9 @@ jobs:
retention-days: 30
deploy:
if: github.ref == 'refs/heads/main'
needs: build-and-test
needs:
- test-and-build
- playwright
runs-on: ubuntu-latest
steps:
- name: Checkout code

20
.idea/workspace.xml generated
View File

@@ -5,7 +5,9 @@
</component>
<component name="ChangeListManager">
<list default="true" id="b30e2810-c4c1-4aad-b134-794e52cc1c7d" name="Changes" comment="ci: run e2e tests">
<change beforePath="$PROJECT_DIR$/.github/workflows/ci.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.github/workflows/ci.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/playwright.config.ts" beforeDir="false" afterPath="$PROJECT_DIR$/playwright.config.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -198,14 +200,6 @@
<workItem from="1719492452780" duration="8000" />
<workItem from="1719496624579" duration="6148000" />
</task>
<task id="LOCAL-00029" summary="refactor: tool options components">
<option name="closed" value="true" />
<created>1719152057230</created>
<option name="number" value="00029" />
<option name="presentableId" value="LOCAL-00029" />
<option name="project" value="LOCAL" />
<updated>1719152057230</updated>
</task>
<task id="LOCAL-00030" summary="fix: join text service">
<option name="closed" value="true" />
<created>1719153044395</created>
@@ -590,7 +584,15 @@
<option name="project" value="LOCAL" />
<updated>1719587132558</updated>
</task>
<option name="localTasksCounter" value="78" />
<task id="LOCAL-00078" summary="ci: run e2e tests">
<option name="closed" value="true" />
<created>1719587281298</created>
<option name="number" value="00078" />
<option name="presentableId" value="LOCAL-00078" />
<option name="project" value="LOCAL" />
<updated>1719587281298</updated>
</task>
<option name="localTasksCounter" value="79" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">

View File

@@ -1,5 +1,7 @@
import { defineConfig, devices } from '@playwright/test';
const baseUrl = process.env.BASE_URL || 'http://localhost:5050';
export default defineConfig({
testDir: './src',
testMatch: /\.e2e\.(spec\.)?ts$/,
@@ -9,6 +11,10 @@ export default defineConfig({
baseURL: 'http://localhost:5173',
trace: 'on-first-retry'
},
webServer: {
command: 'npm run preview',
url: 'http://localhost:4173'
},
projects: [
{
name: 'chromium',