Skip to content

Commit

Permalink
chore: add gh workflow for running vitest
Browse files Browse the repository at this point in the history
  • Loading branch information
netchampfaris committed Dec 18, 2024
1 parent 64ea759 commit fe2512e
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/vitest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '22'
cache: 'yarn'

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run prettier check and tests
run: yarn test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "./src/index.js",
"scripts": {
"test": "vitest",
"prettier": "npx prettier -w ./src",
"prettier": "yarn prettier -w ./src",
"bump-and-release": "git pull --rebase origin main && yarn version --patch && git push && git push --tags",
"dev": "vite",
"build": "vite build",
Expand Down

0 comments on commit fe2512e

Please sign in to comment.