Skip to content

Commit

Permalink
Moved config file
Browse files Browse the repository at this point in the history
  • Loading branch information
zetxek committed Jan 8, 2025
1 parent 9ca676f commit ba2bffd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/test-example-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: lts/*

- name: Cache Node Modules
id: cache-node-modules
Expand Down Expand Up @@ -91,17 +91,14 @@ jobs:
./playwright-report/result.txt
message-failure: |
Workflow failed
# - name: Setup Pages
# if: steps.tests.outputs.fail_count != '0'
# uses: actions/configure-pages@v3

- name: Upload Artifact
if: steps.tests.outputs.fail_count != '0'
uses: actions/upload-pages-artifact@v1
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
path: "./playwright-report"

name: playwright-report
path: playwright-report/
retention-days: 30

- name: Fail the job if there any failed case
if: steps.tests.outputs.fail_count != '0'
run : |
Expand Down
11 changes: 5 additions & 6 deletions tests/playwright.config.ts → playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PlaywrightTestConfig } from '@playwright/test';
import { PlaywrightTestConfig, defineConfig, devices } from '@playwright/test';

import path from 'path';
import fs from 'fs';

Expand All @@ -13,8 +14,8 @@ const testResults = path.join(process.cwd(), 'test-results');
}
});

const config: PlaywrightTestConfig = {
testDir: './e2e',
export default defineConfig ({
testDir: './tests',
use: {
baseURL: 'http://localhost:1313',
screenshot: 'on',
Expand All @@ -33,6 +34,4 @@ const config: PlaywrightTestConfig = {
reuseExistingServer: true,
},
preserveOutput: 'always',
};

export default config;
});

0 comments on commit ba2bffd

Please sign in to comment.