-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (88 loc) · 3.82 KB
/
Copy pathci.yml
File metadata and controls
107 lines (88 loc) · 3.82 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Site checks
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out website
uses: actions/checkout@v7
- name: Read pinned source identities
id: sources
run: |
echo "spec_repository=$(jq -r '.specification.repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "spec_ref=$(jq -r '.specification.ref' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "connect_repository=$(jq -r '.connect.repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "connect_ref=$(jq -r '.connect.ref' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "contracts_repository=$(jq -r '.contracts.repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "contracts_ref=$(jq -r '.contracts.ref' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "rust_repository=$(jq -r '.implementations[] | select(.id == "rust") | .repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "rust_ref=$(jq -r '.implementations[] | select(.id == "rust") | .ref' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "typescript_repository=$(jq -r '.implementations[] | select(.id == "typescript") | .repository' site-sources.json)" >> "$GITHUB_OUTPUT"
echo "typescript_ref=$(jq -r '.implementations[] | select(.id == "typescript") | .ref' site-sources.json)" >> "$GITHUB_OUTPUT"
- name: Check out specification
uses: actions/checkout@v7
with:
repository: ${{ steps.sources.outputs.spec_repository }}
ref: ${{ steps.sources.outputs.spec_ref }}
path: .sources/mdbase-spec
- name: Check out Connect
uses: actions/checkout@v7
with:
repository: ${{ steps.sources.outputs.connect_repository }}
ref: ${{ steps.sources.outputs.connect_ref }}
path: .sources/mdbase-connect
- name: Check out contracts
uses: actions/checkout@v7
with:
repository: ${{ steps.sources.outputs.contracts_repository }}
ref: ${{ steps.sources.outputs.contracts_ref }}
path: .sources/mdbase-contracts
- name: Check out Rust implementation
uses: actions/checkout@v7
with:
repository: ${{ steps.sources.outputs.rust_repository }}
ref: ${{ steps.sources.outputs.rust_ref }}
path: .sources/mdbase-rs
- name: Check out TypeScript implementation
uses: actions/checkout@v7
with:
repository: ${{ steps.sources.outputs.typescript_repository }}
ref: ${{ steps.sources.outputs.typescript_ref }}
path: .sources/mdbase
- uses: pnpm/action-setup@v6
with:
version: 10
- uses: actions/setup-node@v7
with:
node-version: 22
cache: pnpm
- name: Install website dependencies
run: pnpm install --frozen-lockfile
- name: Build contract catalog
working-directory: .sources/mdbase-contracts
run: npm ci && npm run build
- name: Build specification artifact
working-directory: .sources/mdbase-spec/site
run: npm ci && npm run build
- name: Synchronize schemas, contracts, and conformance claims
run: pnpm sync:sources
env:
MDBASE_SPEC_DIR: .sources/mdbase-spec
MDBASE_CONNECT_DIR: .sources/mdbase-connect
MDBASE_CONTRACTS_DIR: .sources/mdbase-contracts
MDBASE_RS_DIR: .sources/mdbase-rs
MDBASE_TS_DIR: .sources/mdbase
- name: Type and content checks
run: pnpm test:deploy:dev && pnpm check
- name: Build website
run: pnpm build
- name: Import specification
run: pnpm import:spec
env:
MDBASE_SPEC_DIR: .sources/mdbase-spec
- name: Check local links
run: pnpm check:links