Merge pull request #1301 from fugufish/update_checker_function_type #910
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: E2E test | |
on: | |
push: | |
branches: | |
- '**' | |
paths-ignore: | |
- 'benchmark/**' | |
- 'dev/**' | |
- 'examples/**' | |
- '*.md' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- 'benchmark/**' | |
- 'dev/**' | |
- 'examples/**' | |
- '*.md' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
#concurrency: | |
# group: ${{ github.workflow }}-${{ github.ref }} | |
# cancel-in-progress: true | |
strategy: | |
matrix: | |
node-version: [18.x] | |
transporter: [NATS, Redis, MQTT, AMQP, AMQP10, Kafka, TCP] | |
serializer: [JSON, JSONExt, MsgPack, Notepack, CBOR] | |
discoverer: [Local, Etcd3, Redis] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} with ${{ matrix.transporter }} transporter and ${{ matrix.serializer }} and ${{ matrix.discoverer }} discoverer | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: npm ci | |
- name: Start NATS | |
run: docker-compose up -d nats && sleep 10 | |
if: ${{ matrix.transporter == 'NATS' }} | |
working-directory: ./test | |
- name: Start Redis | |
run: docker-compose up -d redis && sleep 10 | |
if: ${{ matrix.transporter == 'Redis' || matrix.discoverer == 'Redis' }} | |
working-directory: ./test | |
- name: Start MQTT | |
run: docker-compose up -d mqtt && sleep 10 | |
if: ${{ matrix.transporter == 'MQTT' }} | |
working-directory: ./test | |
- name: Start RabbitMQ | |
run: docker-compose up -d rabbitmq && sleep 10 | |
if: ${{ matrix.transporter == 'AMQP' }} | |
working-directory: ./test | |
- name: Start ActiveMQ | |
run: docker-compose up -d activemq && sleep 30 | |
if: ${{ matrix.transporter == 'AMQP10' }} | |
working-directory: ./test | |
- name: Start Kafka | |
run: docker-compose up -d zookeeper kafka && sleep 60 | |
if: ${{ matrix.transporter == 'Kafka' }} | |
working-directory: ./test | |
- name: Start Etcd3 | |
run: docker-compose up -d etcd3 && sleep 10 | |
if: ${{ matrix.discoverer == 'Etcd3' }} | |
working-directory: ./test | |
- name: Check containers | |
run: docker-compose ps | |
working-directory: ./test | |
- name: Check logs | |
run: docker-compose logs | |
working-directory: ./test | |
- name: Execute E2E tests | |
run: npm run test:e2e | |
timeout-minutes: 5 | |
env: | |
TRANSPORTER: ${{ matrix.transporter }} | |
SERIALIZER: ${{ matrix.serializer }} | |
DISCOVERER: ${{ matrix.discoverer }} | |
# LOGLEVEL: "${{ matrix.transporter == 'Kafka' && 'debug' || 'warn' }}" | |
- name: Stop containers | |
run: docker-compose down -v | |
working-directory: ./test |