Skip to content

Commit

Permalink
ci: run unit tests on each PR (#497)
Browse files Browse the repository at this point in the history
* ci: run unit tests on each PR

* build: delete prepare step from pnpm
  • Loading branch information
pure-js committed Aug 16, 2023
1 parent 65e0dae commit 76330e0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Unit Testing
on:
push:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"main": "dist/browser-detection.js",
"type": "module",
"scripts": {
"prepare": "npm run build",
"start": "vite",
"build": "tsc && vite build",
"lint": "eslint src/**/* --ext .ts",
Expand Down

0 comments on commit 76330e0

Please sign in to comment.