Skip to content

Commit

Permalink
Merge pull request #116 from swup/functional-tests
Browse files Browse the repository at this point in the history
Add tests
  • Loading branch information
daun authored Dec 19, 2023
2 parents 03c4e62 + 4c3e0b5 commit 819d922
Show file tree
Hide file tree
Showing 26 changed files with 3,994 additions and 699 deletions.
19 changes: 0 additions & 19 deletions .editorconfig

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: E2E tests

on:
push:
branches: [main, master, next]
pull_request:
workflow_dispatch:

jobs:
run-tests:
name: E2E tests
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm ci

- name: Bundle library
run: npm run build

- name: Install browsers
run: npx playwright install --with-deps

- name: Run tests
run: npx playwright test --config ./tests/config/playwright.config.ts

- name: Create report comment
uses: daun/playwright-report-summary@v2
if: always()
with:
report-file: playwright-results.json
28 changes: 28 additions & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Unit tests

on:
push:
branches: [main, master, next]
pull_request:
workflow_dispatch:

jobs:
run-tests:
name: Run unit tests
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Check out repo
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18

- run: npm ci
- run: npm run build

- name: Run tests
run: npm run test:unit
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ wiki-wishlist
.editorconfig
.idea
/dist
/tests/fixtures/dist
/tests/reports
/tests/results
Loading

0 comments on commit 819d922

Please sign in to comment.