Skip to content

Commit acc53b2

Browse files
Merge pull request #6 from garydavisonos/task/gd/unit-test
Task/gd/unit test
2 parents be6d98b + 3a71c73 commit acc53b2

File tree

6 files changed

+6325
-481
lines changed

6 files changed

+6325
-481
lines changed

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Publish to npm 🚀"
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: "18.x"
19+
registry-url: "https://registry.npmjs.org/"
20+
21+
- name: Install dependencies
22+
run: npm ci --legacy-peer-deps
23+
24+
- name: Run tests
25+
run: npm run test
26+
27+
- name: Build project
28+
run: npm run build
29+
30+
- name: Publish to npm
31+
run: npm publish
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

jest.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export default {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
testMatch: ["**/__tests__/**/*.ts", "**/?(*.)+(spec|test).ts"],
5+
};

0 commit comments

Comments
 (0)