Skip to content

Commit

Permalink
Add npm run commands for running tests
Browse files Browse the repository at this point in the history
Run tests in github actions
  • Loading branch information
heyman committed Dec 25, 2023
1 parent f6d5242 commit bb1335a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tests
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
"preview": "vite preview",
"build_grammar": "lezer-generator src/editor/lang-heynote/heynote.grammar -o src/editor/lang-heynote/parser.js",
"webapp:dev": "vite webapp",
"webapp:build": "vite build webapp"
"webapp:build": "vite build webapp",
"test": "playwright test",
"test:ui": "playwright test --ui"
},
"devDependencies": {
"@codemirror/autocomplete": "^6.11.1",
Expand Down

0 comments on commit bb1335a

Please sign in to comment.