-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #613 from tuanchauict/add-vitest-run-action
Add code health check for node
- Loading branch information
Showing
6 changed files
with
627 additions
and
532 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,53 @@ | ||
name: Code health check Node | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
- port-to-js | ||
jobs: | ||
vitest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
- name: Cache node modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
monosketch-svelte/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('monosketch-svelte/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
run: cd monosketch-svelte && pnpm install | ||
- name: Run Vitest | ||
run: cd monosketch-svelte && pnpm run test | ||
|
||
bundle_svelte: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
- name: Cache node modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
monosketch-svelte/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('monosketch-svelte/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install dependencies | ||
run: cd monosketch-svelte && pnpm install | ||
- name: Build Svelte | ||
run: cd monosketch-svelte && pnpm run build |
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,36 +1,36 @@ | ||
{ | ||
"name": "monosketch-svelte", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "svelte-check --tsconfig ./tsconfig.json", | ||
"lint": "eslint . --ext .ts,.tsx,.svelte", | ||
"lint:fix": "eslint . --ext .ts,.tsx,.svelte --fix", | ||
"test": "vitest --run" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/vite-plugin-svelte": "^3.1.2", | ||
"@tsconfig/svelte": "^5.0.4", | ||
"@typescript-eslint/eslint-plugin": "^8.5.0", | ||
"@typescript-eslint/parser": "^8.5.0", | ||
"eslint": "^9.10.0", | ||
"eslint-config-standard-with-typescript": "^43.0.1", | ||
"eslint-plugin-import": "^2.30.0", | ||
"eslint-plugin-n": "^17.10.2", | ||
"eslint-plugin-promise": "^7.1.0", | ||
"eslint-plugin-svelte": "^2.43.0", | ||
"sass": "^1.78.0", | ||
"svelte": "^4.2.19", | ||
"svelte-check": "^4.0.1", | ||
"tslib": "^2.7.0", | ||
"typescript": "^5.6.2", | ||
"vite": "^5.4.3", | ||
"vite-plugin-sass": "^0.1.0", | ||
"vite-tsconfig-paths": "^5.0.1", | ||
"vitest": "^2.0.5" | ||
} | ||
"name": "monosketch-svelte", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "vite build", | ||
"preview": "vite preview", | ||
"check": "svelte-check --tsconfig ./tsconfig.json", | ||
"lint": "eslint . --ext .ts,.tsx,.svelte", | ||
"lint:fix": "eslint . --ext .ts,.tsx,.svelte --fix", | ||
"test": "vitest --run" | ||
}, | ||
"devDependencies": { | ||
"@sveltejs/vite-plugin-svelte": "^3.1.2", | ||
"@tsconfig/svelte": "^5.0.4", | ||
"@typescript-eslint/eslint-plugin": "^8.5.0", | ||
"@typescript-eslint/parser": "^8.5.0", | ||
"eslint": "^9.10.0", | ||
"eslint-config-standard-with-typescript": "^43.0.1", | ||
"eslint-plugin-import": "^2.30.0", | ||
"eslint-plugin-n": "^17.10.2", | ||
"eslint-plugin-promise": "^7.1.0", | ||
"eslint-plugin-svelte": "^2.43.0", | ||
"sass": "^1.78.0", | ||
"svelte": "^4.2.19", | ||
"svelte-check": "^4.1.1", | ||
"tslib": "^2.8.1", | ||
"typescript": "^5.7.2", | ||
"vite": "^5.4.11", | ||
"vite-plugin-sass": "^0.1.0", | ||
"vite-tsconfig-paths": "^5.0.1", | ||
"vitest": "^2.1.8" | ||
} | ||
} |
Oops, something went wrong.