From 56c506b53f817be4a029e7c969a62a9653e4c10c Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite <53856673+makuzaverite@users.noreply.github.com> Date: Wed, 17 Mar 2021 22:02:28 +0200 Subject: [PATCH 01/21] setup ci --- .github/workflows/ci.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9a74deb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ + +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x, 15.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - 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 From 2355073281244a2db78248c4336daa547851c214 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite <53856673+makuzaverite@users.noreply.github.com> Date: Wed, 17 Mar 2021 22:05:19 +0200 Subject: [PATCH 02/21] Create dependabot.yml --- .github/dependabot.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..646cb17 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "daily" From 1593cdb94514f27bd4a30e9749d6967af7b7d4df Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Wed, 17 Mar 2021 22:06:46 +0200 Subject: [PATCH 03/21] init --- .github/workflows/ci.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a74deb..872d36d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x, 15.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + node-version: [12.x, 14.x, 15.x] steps: - uses: actions/checkout@v2 @@ -23,6 +22,16 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm run build --if-present - - run: npm test + - name: Install Dependencies + run: npm install --ignore-scripts + - name: Test + run: npm test + + automerge: + needs: test + runs-on: ubuntu-latest + steps: + - uses: fastify/github-action-merge-dependabot@v2.0.0 + if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} + with: + github-token: ${{secrets.github_token}} From fedbf60c4b7a2073a5e73918c8f483c681e76998 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Wed, 17 Mar 2021 22:09:13 +0200 Subject: [PATCH 04/21] init --- .github/workflows/ci.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 872d36d..fad5461 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,18 +8,20 @@ on: branches: [ master ] jobs: - build: - + test: runs-on: ubuntu-latest - strategy: matrix: - node-version: [12.x, 14.x, 15.x] - + node-version: [10.x, 12.x, 14.x] + services: + kafka: + image: confluentinc/cp-kafka + ports: + - 9092:9092 steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 + uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node-version }} - name: Install Dependencies @@ -27,6 +29,7 @@ jobs: - name: Test run: npm test + automerge: needs: test runs-on: ubuntu-latest From 05133d66179ee8b7fa9110717002dffe44352fbf Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Fri, 19 Mar 2021 15:40:43 +0200 Subject: [PATCH 05/21] remove travis ci --- .travis.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8f0b6b1..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: node_js - -node_js: - - "14" - - "12" - - "10" - -services: - - docker - -before_script: - - docker-compose up -d - - sleep 60 - - docker-compose ps - -script: - - npm test - -after_script: - - docker-compose down - -notifications: - email: - on_success: never - on_failure: always From 1abc2714c4fb027752d97c90be88f4826c881be3 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 13:27:00 +0200 Subject: [PATCH 06/21] update --- lib/consumer.js | 2 +- lib/producer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/consumer.js b/lib/consumer.js index 6b534ef..df4463c 100644 --- a/lib/consumer.js +++ b/lib/consumer.js @@ -7,7 +7,7 @@ const Kafka = require('node-rdkafka') function Consumer (opts, log, next, topicConf, metadatOptions) { this._log = log this.consumer = new Kafka.KafkaConsumer(opts, topicConf || {}) - var calledNext = false + let calledNext = false this.consumer.once('ready', onReady.bind(this)) this.consumer.on('event.error', onError.bind(this)) diff --git a/lib/producer.js b/lib/producer.js index 0f7aab6..1477b73 100644 --- a/lib/producer.js +++ b/lib/producer.js @@ -8,7 +8,7 @@ function Producer (opts, log, next, topicConf, metadatOptions) { this._log = log this.producer = new Kafka.Producer(opts, topicConf || {}) - var calledNext = false + let calledNext = false this.producer.once('ready', onReady.bind(this)) this.producer.on('event.error', onError.bind(this)) From 4a649539bed5fe2013a4afe5856910dfc47c099b Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:28:21 +0200 Subject: [PATCH 07/21] setup compose --- .github/workflows/ci.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fad5461..96c2f0c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,13 +13,15 @@ jobs: strategy: matrix: node-version: [10.x, 12.x, 14.x] - services: - kafka: - image: confluentinc/cp-kafka - ports: - - 9092:9092 + # services: + # kafka: + # image: confluentinc/cp-kafka + # ports: + # - 9092:9092 steps: - uses: actions/checkout@v2 + - name: Build the stack + run: docker-compose up -d - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 with: From d252b7fa0ae43fc47bfae17eee2b9159fabc9219 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:30:02 +0200 Subject: [PATCH 08/21] setup compose --- .github/workflows/ci.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96c2f0c..7cef78b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,11 +13,6 @@ jobs: strategy: matrix: node-version: [10.x, 12.x, 14.x] - # services: - # kafka: - # image: confluentinc/cp-kafka - # ports: - # - 9092:9092 steps: - uses: actions/checkout@v2 - name: Build the stack From 58a25cb92d4fa14d6cdc8325921462f7dd5b7ce6 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:32:36 +0200 Subject: [PATCH 09/21] fix action name --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cef78b..3ecc781 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,3 @@ - name: CI on: From 98d85c1ff72e94dbb5c5cc2f7fbd3d15f690a637 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:34:06 +0200 Subject: [PATCH 10/21] fix action name --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3ecc781..706b2a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,9 @@ jobs: matrix: node-version: [10.x, 12.x, 14.x] steps: - - uses: actions/checkout@v2 - - name: Build the stack - run: docker-compose up -d + # - uses: actions/checkout@v2 + # - name: Build kafka + # run: docker-compose up -d - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 with: From 0aeb7fb3bb4385ce1519c5f075c6600623e079b6 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:39:02 +0200 Subject: [PATCH 11/21] fix action name --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 706b2a1..58245bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,9 @@ jobs: matrix: node-version: [10.x, 12.x, 14.x] steps: - # - uses: actions/checkout@v2 - # - name: Build kafka - # run: docker-compose up -d + - uses: actions/checkout@v2 + - name: Build kafka + run: docker-compose up - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 with: From cc449d401206b0c0b07df731958cea678a4641b7 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:40:40 +0200 Subject: [PATCH 12/21] fix action name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 58245bf..cd25f07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,8 +13,8 @@ jobs: matrix: node-version: [10.x, 12.x, 14.x] steps: - - uses: actions/checkout@v2 - name: Build kafka + - uses: actions/checkout@v2 run: docker-compose up - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 From 3f9a723f6c8ef3822788bf73669afbb2d5a06c62 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:41:22 +0200 Subject: [PATCH 13/21] fix action name --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd25f07..dc4e0ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,8 @@ jobs: node-version: [10.x, 12.x, 14.x] steps: - name: Build kafka - - uses: actions/checkout@v2 - run: docker-compose up + # - uses: actions/checkout@v2 + run: docker-compose up - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 with: From 52a652cd5dff1e87a578ce5e0c6c685e2261984e Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:42:45 +0200 Subject: [PATCH 14/21] fix action name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc4e0ed..73926be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: node-version: [10.x, 12.x, 14.x] steps: - name: Build kafka - # - uses: actions/checkout@v2 + uses: actions/checkout@v2 run: docker-compose up - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 From a4b199ae0c8129d5415f03de4ba43aafeeebe8cd Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:43:55 +0200 Subject: [PATCH 15/21] fix action name --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73926be..5d9fae4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,13 +13,13 @@ jobs: matrix: node-version: [10.x, 12.x, 14.x] steps: - - name: Build kafka - uses: actions/checkout@v2 - run: docker-compose up - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node-version }} + - name: Build kafka + uses: actions/checkout@v2 + run: docker-compose up -d - name: Install Dependencies run: npm install --ignore-scripts - name: Test From f934f2f94df0acc24a68f70123f60677d93176a3 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:45:07 +0200 Subject: [PATCH 16/21] fix action name --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d9fae4..73926be 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,13 +13,13 @@ jobs: matrix: node-version: [10.x, 12.x, 14.x] steps: + - name: Build kafka + uses: actions/checkout@v2 + run: docker-compose up - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node-version }} - - name: Build kafka - uses: actions/checkout@v2 - run: docker-compose up -d - name: Install Dependencies run: npm install --ignore-scripts - name: Test From e700c6d3662640f0f9f12d445e5249b97f8543ee Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:52:50 +0200 Subject: [PATCH 17/21] fix action name --- .github/workflows/ci.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73926be..dbefc0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,17 +13,17 @@ jobs: matrix: node-version: [10.x, 12.x, 14.x] steps: - - name: Build kafka - uses: actions/checkout@v2 - run: docker-compose up - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v2.1.5 - with: - node-version: ${{ matrix.node-version }} - - name: Install Dependencies - run: npm install --ignore-scripts - - name: Test - run: npm test + - uses: actions/checkout@v2 + - name: Build the Kafka + run: docker-compose up -d + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2.1.5 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: npm install --ignore-scripts + - name: Test + run: npm test automerge: From 522d8cc2b6df3a408b289e41000a53c9f344270d Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:56:19 +0200 Subject: [PATCH 18/21] fix action name --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbefc0e..7777cc4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,8 @@ jobs: matrix: node-version: [10.x, 12.x, 14.x] steps: - - uses: actions/checkout@v2 - - name: Build the Kafka - run: docker-compose up -d + # - uses: actions/checkout@v2 + # - name: Build the Kafka - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 with: @@ -23,6 +22,7 @@ jobs: - name: Install Dependencies run: npm install --ignore-scripts - name: Test + run: docker-compose up -d run: npm test From 2dfbf255bc3e5b1f771cbb9ab517b6ecda051081 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Sat, 20 Mar 2021 21:58:40 +0200 Subject: [PATCH 19/21] fix action name --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7777cc4..0763ea9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,9 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install Dependencies run: npm install --ignore-scripts - - name: Test + - name: Build container run: docker-compose up -d + - name: Test run: npm test From 754079eeb72f68a2df49ee729fdef3d1086b8406 Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Wed, 24 Mar 2021 15:03:13 +0200 Subject: [PATCH 20/21] setup --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0763ea9..879f25c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,16 +13,14 @@ jobs: matrix: node-version: [10.x, 12.x, 14.x] steps: - # - uses: actions/checkout@v2 - # - name: Build the Kafka + - name: Build container + run: docker-compose up -d - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5 with: node-version: ${{ matrix.node-version }} - name: Install Dependencies run: npm install --ignore-scripts - - name: Build container - run: docker-compose up -d - name: Test run: npm test From 9437c89606f679986d20a9c5167d1476d95d5f3f Mon Sep 17 00:00:00 2001 From: Makuza Mugabo Verite Date: Wed, 24 Mar 2021 15:49:05 +0200 Subject: [PATCH 21/21] fix ci --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 879f25c..2b2f276 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,7 @@ jobs: node-version: [10.x, 12.x, 14.x] steps: - name: Build container + - uses: actions/checkout@v2 run: docker-compose up -d - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2.1.5