Repository navigation
57 lines (56 loc) · 2.3 KB
/
Copy pathrender.yml
File metadata and controls
57 lines (56 loc) · 2.3 KB
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
# SPDX-FileCopyrightText: 2026 hardenedlinux Linux Team and Contributors
#
# SPDX-License-Identifier: LGPL-2.1-or-later
name: Deterministic Engineering Render
on:
pull_request:
paths:
- 'packages/render/**'
- 'package.json'
- 'bun.lock'
- 'docs/90-99-views/90-architecture-views/**'
- '.github/workflows/render.yml'
push:
branches: [main]
paths:
- 'packages/render/**'
- 'package.json'
- 'bun.lock'
- 'docs/90-99-views/90-architecture-views/**'
- '.github/workflows/render.yml'
permissions:
contents: read
jobs:
renderer:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6
with:
bun-version: 1.3.11
- run: bun install --frozen-lockfile
- run: bunx playwright install --with-deps chromium
- run: bun run typecheck
- run: bun run test
- run: bun run test:export
- run: bun run test:examples
- run: bun run example:case
- run: bun run example:compare
- run: bun run example:overviews
- run: bun run example:design
- name: Consume the reviewed Git package through Bun
env:
RENDER_REVISION: ${{ github.event.pull_request.head.sha || github.sha }}
run: |
render_version=$(bun -e 'import metadata from "./package.json"; process.stdout.write(metadata.version)')
export RENDER_EXPECTED_VERSION="$render_version"
render_consumer=$(mktemp -d)
cd "$render_consumer"
bun init -y
bun add "@deterministic-engineering/render@git+https://github.com/hardenedlinux/deterministic-engineering.git#$RENDER_REVISION"
bun -e 'import metadata from "@deterministic-engineering/render/package.json"; import {compileModel} from "@deterministic-engineering/render"; if(metadata.version!==process.env.RENDER_EXPECTED_VERSION)throw new Error("Wrong Git package version"); const compiled=await compileModel({"consumer.d2":"Library -> Consumer"},"consumer.d2"); if(compiled.model.relations.length!==1)throw new Error("Git-installed worker did not compile the consumer model");'