Skip to content

Test

Test #35

Workflow file for this run

name: Test
on:
- push
- pull_request
- workflow_dispatch
jobs:
build:
services:
zookeeper:
image: confluentinc/cp-zookeeper:6.2.0
ports:
- 2181:2181
env:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
image: confluentinc/cp-kafka:6.2.0
ports:
- 29092:29092
- 9092:9092
env:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
strategy:
max-parallel: 1 # for some reason, sometimes parallels execution fail
matrix:
os: [ ubuntu-20.04 ]
node: [ 14, 16 ]
name: Test Nodejs v${{ matrix.node }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Create .env file
run: |
cat > .env <<EOF
KAFKA_SERVER="localhost:9092"
EOF
- uses: chrvadala/github-actions/nodejs-test-library-action@v1
with:
NODE_VERSION: ${{ matrix.node }}
- name: Publish Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-nodejs-v${{ matrix.node }}-${{ matrix.os }}
parallel: true
finish:
name: Finish
needs: build
runs-on: ubuntu-20.04
steps:
- name: Coveralls Finished
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true