Skip to content

Commit

Permalink
chore: introduce workflow for running tests (#37)
Browse files Browse the repository at this point in the history
* add ci workflow

* update test:prettier script

* only run on ubuntu
  • Loading branch information
achou11 authored Jan 22, 2025
1 parent 95a6100 commit 7e5c940
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: CI

on:
push:
branches: [main]
pull_request:

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"prepare": "husky install",
"format": "prettier --write .",
"test:eslint": "eslint . --cache",
"test:prettier": "prettier --check **/*.js",
"test:prettier": "prettier --cache --check **/*.js",
"test:typescript": "npm run type",
"test:node": "node --test",
"test": "npm-run-all --aggregate-output --print-label --parallel test:*",
Expand Down

0 comments on commit 7e5c940

Please sign in to comment.