Skip to content

Commit

Permalink
Merge pull request #3 from DamianOsipiuk/cleanup-npm-package
Browse files Browse the repository at this point in the history
Cleanup npm package
  • Loading branch information
Damian Osipiuk authored Apr 10, 2020
2 parents 11d0bc7 + 7c98309 commit b0b0985
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/npmpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,24 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.x, 12.x]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
- run: npm ci
- run: npm test
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
env:
CI: true

publish-npm:
needs: build
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "0.1.5",
"description": "Library exposing TestRail API",
"main": "lib/index.js",
"files": [
"/lib"
],
"typings": "lib/index.d.ts",
"engines": {
"node": ">=10.9"
Expand Down
4 changes: 2 additions & 2 deletions src/api.test.ts → tests/api.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fetch from "node-fetch";

import { TestRail } from "./api";
import { HttpMethod, ResponseType } from "./interfaces";
import { TestRail } from "../src/api";
import { HttpMethod, ResponseType } from "../src/interfaces";

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

0 comments on commit b0b0985

Please sign in to comment.