Skip to content

Commit

Permalink
C.I Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Johan8927 committed Oct 24, 2024
1 parent da6ace3 commit 59f622d
Show file tree
Hide file tree
Showing 9 changed files with 812 additions and 28 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ dist-ssr
*.njsproj
*.sln
*.sw?
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
2 changes: 1 addition & 1 deletion Tests.github/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node: [10, 12, 14, 16, 20]
node: [10, 12, 14, 16, 18, 20]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
180 changes: 180 additions & 0 deletions package-lock.json

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

28 changes: 3 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,28 @@
{

"name": "hangman",

"private": true,

"version": "0.0.0",

"type": "module",

"scripts": {

"dev": "vite",

"build": "vite build",

"preview": "vite preview",

"test": "vitest",

"coverage": "vitest run --coverage"

},

"devDependencies": {

"@playwright/test": "^1.48.1",
"@types/node": "^22.7.9",
"@vitest/browser": "^2.1.3",

"@vitest/coverage-istanbul": "^2.1.3",

"@vitest/coverage-v8": "^2.1.3",

"@vitest/ui": "^2.1.3",
"playwright": "^1.48.1",

"vite": "^5.4.8",

"vitest": "^2.1.3"

},

"dependencies": {

"jsdom": "^25.0.1",

"jsom": "^1.0.0"

}

}

Loading

0 comments on commit 59f622d

Please # to comment.