From ab53a1b7600a7d0644da520d29f8686dfb302aa3 Mon Sep 17 00:00:00 2001 From: Dom Harrington Date: Fri, 25 Aug 2023 10:38:55 +0100 Subject: [PATCH 1/3] ci: add github actions based CI workflow Remove references to travis ci --- .github/workflows/ci.yaml | 26 ++++++++++++++++++++++++++ .travis.yml | 19 ------------------- README.md | 3 --- 3 files changed, 26 insertions(+), 22 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..fcb19ab --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,26 @@ +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [16.x, 18.x, 20.x] + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 91100fa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: node_js - -node_js: - - "10" - - "12" - - "13" - -script: - - yarn lint - - yarn test - - yarn build - -jobs: - include: - - stage: deploy - if: branch = master AND type = push AND fork = false - script: git checkout master && yarn build && yarn auto shipit - node_js: "10" - skip-cleanup: true diff --git a/README.md b/README.md index d13480f..87da321 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,6 @@ Git log parser for Node.JS -[![build status](https://api.travis-ci.org/domharrington/node-gitlog.svg)](http://travis-ci.org/domharrington/node-gitlog) -[![dependency status](https://david-dm.org/domharrington/node-gitlog.svg)](https://david-dm.org/domharrington/node-gitlog) - ## Installation ```sh From 33cfb44c9954526f5923a0b2e6a0a04dbb94aa9a Mon Sep 17 00:00:00 2001 From: Dom Harrington Date: Fri, 25 Aug 2023 10:39:42 +0100 Subject: [PATCH 2/3] fix: typescript error to do with unknown type ``` TypeScript diagnostics (customize using `[jest-config].globals.ts-jest.diagnostics` option): src/index.ts:5:3 - error TS2724: '"child_process"' has no exported member named 'ExecFileException'. Did you mean 'ExecException'? 5 ExecFileException, ~~~~~~~~~~~~~~~~~ ``` --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index 6caf4fd..7b0884c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import { execFile, execFileSync, ExecFileSyncOptions, - ExecFileException, + ExecException, } from "child_process"; import { existsSync } from "fs"; import createDebugger from "debug"; @@ -306,7 +306,7 @@ function createCommandArguments< return command; } -type GitlogError = ExecFileException | null; +type GitlogError = ExecException | null; type CommitBase = Record; type CommitBaseWithFiles = Record< From 0c43facdf6e6e8d96807afc1bd270989163abe38 Mon Sep 17 00:00:00 2001 From: Dom Harrington Date: Fri, 25 Aug 2023 10:44:20 +0100 Subject: [PATCH 3/3] fix: update branch name --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fcb19ab..aba08bd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -2,9 +2,9 @@ name: Node.js CI on: push: - branches: [ main ] + branches: [ master ] pull_request: - branches: [ main ] + branches: [ master ] jobs: build: