-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (57 loc) · 1.91 KB
/
runtime-testing.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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 && (startsWith(github.event.pull_request.title, 'feat') || startsWith(github.event.pull_request.title, 'fix'))"
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:
name: Runtime Testing TypeScript
runs-on: ubuntu-latest
needs: 'build'
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:typescript:setup
- name: Run runtime tests
run: npm run runtime:typescript:test