Skip to content

Commit

Permalink
fix: ci
Browse files Browse the repository at this point in the history
  • Loading branch information
iib0011 committed Jun 28, 2024
1 parent fdaaa2f commit 7bd8e4a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

jobs:
build-and-test:
test-and-build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Build project
run: npm run build

playwright:
e2e-test:
name: 'Playwright Tests'
runs-on: ubuntu-latest
steps:
Expand All @@ -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:
Expand All @@ -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
Expand Down
20 changes: 11 additions & 9 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -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$/,
Expand All @@ -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',
Expand Down

0 comments on commit 7bd8e4a

Please sign in to comment.