Skip to content

feat: add models generator #502

feat: add models generator

feat: add models generator #502

Workflow file for this run

name: Runtime Testing The Codegen Project
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
build:
name: Prepare for runtime testing
runs-on: ubuntu-latest
if: "github.event.pull_request.draft == false"
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ steps.lockversion.outputs.version }}"
- name: Install dependencies
shell: bash
run: npm ci
- name: Build library
run: npm run build
- name: Assets generation
run: npm run generate:assets
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
retention-days: 1
name: build-artifacts
path: |
dist
node_modules
oclif.manifest.json
typescript-runtime-tests:
name: Runtime Testing TypeScript - ${{ matrix.test-type }}
runs-on: ubuntu-latest
needs: 'build'
strategy:
fail-fast: false
matrix:
include:
- test-type: 'Kafka'
service: 'kafka'
test-command: 'test:kafka'
needs-service: true
- test-type: 'NATS'
service: 'nats'
test-command: 'test:nats'
needs-service: true
- test-type: 'MQTT'
service: 'mqtt'
test-command: 'test:mqtt'
needs-service: true
- test-type: 'AMQP'
service: 'amqp'
test-command: 'test:amqp'
needs-service: true
- test-type: 'EventSource'
service: ''
test-command: 'test:eventsource'
needs-service: false
- test-type: 'HTTP'
service: ''
test-command: 'test:http'
needs-service: false
- test-type: 'Regular Tests'
service: ''
test-command: 'test:regular'
needs-service: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Archive build artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ steps.lockversion.outputs.version }}"
- name: Setup for runtime test
run: |
npm run runtime:prepare
${{ matrix.needs-service == true && format('npm run runtime:{0}:start', matrix.service) || '' }}
npm run runtime:typescript:generate
- name: Run ${{ matrix.test-type }} runtime tests
run: cd test/runtime/typescript && npm run ${{ matrix.test-command }}
- name: Stop ${{ matrix.service }} services
if: always() && matrix.needs-service == true
run: npm run runtime:${{ matrix.service }}:stop