Skip to content

Commit b0b0985

Browse files
author
Damian Osipiuk
authored
Merge pull request #3 from DamianOsipiuk/cleanup-npm-package
Cleanup npm package
2 parents 11d0bc7 + 7c98309 commit b0b0985

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

Diff for: .github/workflows/npmpublish.yml

+16-6
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,24 @@ on:
99

1010
jobs:
1111
build:
12+
1213
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [10.x, 12.x]
18+
1319
steps:
14-
- uses: actions/checkout@v2
15-
- uses: actions/setup-node@v1
16-
with:
17-
node-version: 12
18-
- run: npm ci
19-
- run: npm test
20+
- uses: actions/checkout@v2
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v1
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- run: npm ci
26+
- run: npm run build --if-present
27+
- run: npm test
28+
env:
29+
CI: true
2030

2131
publish-npm:
2232
needs: build

Diff for: package.json

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"version": "0.1.5",
44
"description": "Library exposing TestRail API",
55
"main": "lib/index.js",
6+
"files": [
7+
"/lib"
8+
],
69
"typings": "lib/index.d.ts",
710
"engines": {
811
"node": ">=10.9"

Diff for: src/api.test.ts renamed to tests/api.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fetch from "node-fetch";
22

3-
import { TestRail } from "./api";
4-
import { HttpMethod, ResponseType } from "./interfaces";
3+
import { TestRail } from "../src/api";
4+
import { HttpMethod, ResponseType } from "../src/interfaces";
55

66
jest.mock("node-fetch", () => jest.fn());
77
const { Response } = jest.requireActual("node-fetch");

0 commit comments

Comments
 (0)