From 46cd84528c3bf7c4e3cc5b0a45a6a99f572f44e0 Mon Sep 17 00:00:00 2001 From: Fabian Haas <29468630+hfxbse@users.noreply.github.com> Date: Mon, 25 Mar 2024 09:50:24 +0100 Subject: [PATCH] add test workflow --- .github/workflows/test.yml | 29 +++++++++++++++++++++++++++++ package.json | 3 ++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8ad4b0a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +name: tests +run-name: Tests +on: + pull_request: + branches: + - main + push: + branches: + - main + +jobs: + node-unit-tests: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + name: "Checkout out repository" + + - uses: actions/setup-node@v4 + name: "Set up Node.js" + with: + node-version: 21.x + cache: npm + + - run: npm install + name: "Install project dependencies" + + - run: npm run test + name: "Run tests" diff --git a/package.json b/package.json index 159a9e2..f7f73b7 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "main": "index.js", "scripts": { "prerun": "tsc", - "run": "node ./build/index.js" + "run": "node ./build/index.js", + "test": "" }, "type": "module", "keywords": [],