-
-
Notifications
You must be signed in to change notification settings - Fork 160
62 lines (59 loc) · 1.6 KB
/
verify-build.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
60
61
62
# Make sure the EventCatalog can build OK
name: Verify Build
on:
pull_request:
branches:
- master
- main
jobs:
build-cli:
name: Build cli
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
- name: Installation
run: pnpm i
- name: Test
run: pnpm run test:ci
- name: Build cli
run: pnpm run build:bin
- name: Package
run: pnpm pack
- name: Rename package artifact
run: mv *.tgz package.tgz # Rename to a consistent name
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: eventcatalog-core-package-artifact
path: package.tgz
build-eventcatalog:
name: Build EventCatalog
timeout-minutes: 10
needs: build-cli
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Download package artifact
uses: actions/download-artifact@v4
with:
name: eventcatalog-core-package-artifact
- name: Install @eventcatalog-core
working-directory: examples/default/
run: npm install ../../package.tgz
- name: Build EventCatalog
working-directory: examples/default/
run: npx eventcatalog build