Skip to content

Commit 4037260

Browse files
Merge pull request #2 from codeAdityagithub/dev
added github actions
2 parents 32a2acb + 8995fb8 commit 4037260

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Run Vitest before PR
2+
3+
on:
4+
pull_request:
5+
branches: ["main", "dev"]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: 20.11.0 # Change this to your preferred Node.js version
19+
cache: npm # Change to yarn or pnpm if you use those
20+
21+
- name: Install dependencies
22+
run: npm ci # Change to yarn or pnpm if applicable
23+
24+
- name: Run Vitest tests
25+
run: npm run test # Ensure this script runs all tests
26+

0 commit comments

Comments
 (0)