Skip to content

Commit

Permalink
Add test command and ci settings
Browse files Browse the repository at this point in the history
  • Loading branch information
yosipy committed Jul 27, 2024
1 parent 2f9f339 commit 8ea58e0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:

jobs:
ts-test:
name: TS Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Cache node modules
uses: actions/cache@v4
id: node_modules_cache_id
env:
cache-name: cache-node-modules
with:
path: ./node_modules
key: ${{ runner.os }}-npm-${{ env.cache-name }}-${{ hashFiles('./package-lock.json') }}
- name: npm ci
if: ${{ steps.node_modules_cache_id.outputs.cache-hit != 'true' }}
run: |
npm ci
- name: Run test
run: |
npm run test
- name: Run build
run: npm run build
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"build": "vite build && tsc -p tsconfig.package.json",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"test": "vitest",
"docs:dev": "vitepress dev docs --host 0.0.0.0",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
Expand Down

0 comments on commit 8ea58e0

Please sign in to comment.