Skip to content

Commit

Permalink
Add build and test workflow (#1)
Browse files Browse the repository at this point in the history
* Add build and test workflow

* Add PR to workflow triggers

* Remove tsc
  • Loading branch information
haroldadmin authored Apr 5, 2024
1 parent cc7f984 commit 28ec32e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build

on:
- push
- pull_request

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20.x
cache: "npm"
- run: npm ci
- run: npm run build --if-present
- run: npm test
10 changes: 0 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"scripts": {
"build": "tsc",
"format": "prettier -w .",
"test": "vitest"
"test": "vitest run",
"test:watch": "vitest"
},
"author": "haroldadmin",
"license": "ISC",
"devDependencies": {
"@types/node": "^20.12.4",
"prettier": "^3.2.5",
"tsc": "^2.0.4",
"typescript": "^5.4.3",
"vitest": "^1.4.0"
}
Expand Down

0 comments on commit 28ec32e

Please sign in to comment.