-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Unit and E2E Testing and CI (#3)
* feat: add unit testing * chore: suppress suspense warning * feat: e2e test * chore: add ci
- Loading branch information
1 parent
7538522
commit c9c1bfe
Showing
11 changed files
with
653 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v2 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: pnpm | ||
|
||
- name: Install | ||
run: pnpm install | ||
|
||
- name: Lint | ||
run: pnpm run lint | ||
|
||
typecheck: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v2 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
cache: pnpm | ||
|
||
- name: Install | ||
run: pnpm install | ||
|
||
- name: Typecheck | ||
run: pnpm run typecheck | ||
|
||
e2e: | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/action-setup@v2 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Install Playwright Browsers | ||
run: pnpm playwright-core install chromium | ||
- name: Run tests | ||
run: pnpm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,31 @@ | ||
{ | ||
"private": true, | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"build": "nuxt build", | ||
"dev": "nuxt dev -o", | ||
"generate": "nuxt generate", | ||
"preview": "nuxt preview", | ||
"postinstall": "nuxt prepare", | ||
"typecheck": "nuxt typecheck", | ||
"test": "vitest", | ||
"lint": "eslint . --fix --ignore-path .gitignore" | ||
}, | ||
"devDependencies": { | ||
"@mdi/js": "^7.4.47", | ||
"@nuxt/devtools": "latest", | ||
"@nuxt/eslint-config": "^0.2.0", | ||
"@nuxt/test-utils": "^3.10.0", | ||
"@vue/test-utils": "^2.4.3", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"happy-dom": "^13.3.1", | ||
"nuxt": "^3.9.3", | ||
"playwright-core": "^1.41.1", | ||
"prettier": "^3.2.4", | ||
"rollup-plugin-regexp": "^5.0.1", | ||
"vitest": "^1.2.1", | ||
"vue-tsc": "^1.8.27", | ||
"vuetify-nuxt-module": "^0.10.2" | ||
}, | ||
|
Oops, something went wrong.