Skip to content

Commit

Permalink
chore: ci updates and style change (#24)
Browse files Browse the repository at this point in the history
* docs(readme): add badges

* docs(readme): update http link to https

* chore: remove old dependabot v1 config

* ci(dependabot): add github-actions

* ci: ignore documentation updates

* style(ci): use standardized template

* chore: remove travis config file

* build(docker): fix to adhere to docker-compose spec

* docs(readme): grammar fix

* chore(package): add detach command option to docker-compose
  • Loading branch information
Fdawgs authored Mar 26, 2021
1 parent 994acc7 commit bbd72fa
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 81 deletions.
5 changes: 0 additions & 5 deletions .dependabot/config.yml

This file was deleted.

12 changes: 9 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: github-actions
directory: '/'
schedule:
interval: "daily"
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
open-pull-requests-limit: 10
52 changes: 28 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,44 @@

name: CI

on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '*.md'

jobs:
test:
runs-on: ubuntu-latest

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: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install --ignore-scripts
- name: Test
run: npm test
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: |
npm install --ignore-scripts
- name: Run Tests
run: |
npm run infra:start
npm run test
automerge:
needs: test
runs-on: ubuntu-latest
steps:
- uses: fastify/[email protected]
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }}
with:
github-token: ${{secrets.github_token}}
needs: test
runs-on: ubuntu-latest
steps:
- uses: fastify/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
25 changes: 0 additions & 25 deletions .travis.yml

This file was deleted.

9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# fastify-kafka

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](http://standardjs.com/) [![Build Status](https://travis-ci.org/fastify/fastify-kafka.svg?branch=master)](https://travis-ci.org/fastify/fastify-kafka)
![CI](https://github.com/fastify/fastify-kafka/workflows/CI/badge.svg)
[![NPM version](https://img.shields.io/npm/v/fastify-kafka.svg?style=flat)](https://www.npmjs.com/package/fastify-kafka)
[![Known Vulnerabilities](https://snyk.io/test/github/fastify/fastify-kafka/badge.svg)](https://snyk.io/test/github/fastify/fastify-kafka)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)

Fastify plugin to interact with [Apache Kafka](http://kafka.apache.org/). Supports Kafka producer and consumer.
To achieve the best performances internally uses [`node-rdkafka`](https://github.com/Blizzard/node-rdkafka).
To achieve the best performance, the plugin uses [`node-rdkafka`](https://github.com/Blizzard/node-rdkafka).

### Install

Expand Down Expand Up @@ -71,7 +74,7 @@ This module exposes the following apis:
## Acknowledgements

This project is kindly sponsored by:
- [LetzDoIt](http://www.letzdoitapp.com/)
- [LetzDoIt](https://www.letzdoitapp.com/)

## License

Expand Down
41 changes: 21 additions & 20 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
---
zookeeper:
image: confluentinc/cp-zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka
links:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
version: "3.9"
services:
zookeeper:
image: confluentinc/cp-zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka
links:
- zookeeper
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://localhost:9092'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"types": "index.d.ts",
"scripts": {
"infra:start": "docker-compose up",
"infra:start": "docker-compose up -d",
"infra:stop": "docker-compose stop",
"test": "standard && tsd && tap -j=1 test/*.js"
},
Expand Down

0 comments on commit bbd72fa

Please sign in to comment.