-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (68 loc) · 2.68 KB
/
Copy pathci.yml
File metadata and controls
82 lines (68 loc) · 2.68 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on:
pull_request:
push:
branches:
- main
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Audit production dependencies
run: npm run audit:production
- name: Test
run: npm test
- name: Typecheck
run: npm run typecheck
# Rebuilds dist/ and fails when the committed output is stale. dist/ is
# committed so a tagged GitHub install needs no build step, so a stale
# commit would ship the wrong CLI to adopters.
- name: Check generated dist
run: npm run check:dist
native-publication-broker:
permissions:
contents: read
runs-on: macos-15
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Run native peer-authentication and publication tests
env:
KAIZEN_REQUIRE_NATIVE_BROKER_TESTS: '1'
run: npx vitest run test/macos-publication-broker.test.ts --reporter=verbose
- name: Compile the packaged broker artifacts
run: |
set -euo pipefail
package=$(npm pack --silent)
package_root=$(mktemp -d "$RUNNER_TEMP/kaizen-package.XXXXXX")
tar -xzf "$package" -C "$package_root"
sh -n "$package_root/package/scripts/install-macos-publication-broker.sh"
swiftc -module-cache-path "$RUNNER_TEMP/kaizen-broker-module-cache" "$package_root/package/scripts/macos/kaizen-publication-broker.swift" -o "$RUNNER_TEMP/kaizen-publication-broker"
swiftc -module-cache-path "$RUNNER_TEMP/kaizen-scheduled-module-cache" "$package_root/package/scripts/macos/kaizen-scheduled-launcher.swift" -o "$RUNNER_TEMP/kaizen-scheduled-launcher"
swiftc -module-cache-path "$RUNNER_TEMP/kaizen-supervisor-module-cache" "$package_root/package/scripts/macos/kaizen-supervisor-launcher.swift" -o "$RUNNER_TEMP/kaizen-supervisor-launcher"