Skip to content

Commit e35f12a

Browse files
authored
Merge pull request #8 from symbioticfi/feat/fix-ci
fix: ci process
2 parents 91f5f17 + ef969c2 commit e35f12a

62 files changed

Lines changed: 16387 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
ci:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
cache: 'npm'
24+
25+
- name: Install buf
26+
uses: bufbuild/buf-setup-action@v1
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Run lint
32+
run: npm run lint
33+
34+
- name: Run build
35+
run: npm run build
36+
37+
- name: Check generated files are up to date
38+
run: |
39+
# Generate protobuf files
40+
chmod +x ./scripts/update-proto.sh
41+
./scripts/update-proto.sh
42+
43+
# Check if any files changed
44+
if [ -n "$(git status --porcelain)" ]; then
45+
echo "❌ Generated files are out of date. Please run 'npm run update:proto' and commit the changes."
46+
echo "Changed files:"
47+
git status --porcelain
48+
git diff
49+
exit 1
50+
else
51+
echo "✅ Generated files are up to date"
52+
fi

buf.gen.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
version: v2
22
inputs:
33
- directory: .
4+
- module: buf.build/googleapis/googleapis
5+
- module: buf.build/protocolbuffers/wellknowntypes
46
managed:
57
enabled: true
68
plugins:

examples/basic-usage.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import {
4242
ListenProofsRequestSchema,
4343
ListenValidatorSetRequestSchema,
4444
Signature,
45-
SignatureRequest,
4645
ChainEpochInfo,
4746
} from "@symbioticfi/relay-client-ts";
4847
import { create } from "@bufbuild/protobuf";
@@ -216,11 +215,12 @@ async function main() {
216215
const epochInfos = await client.getLastAllCommitted();
217216
for (const [chainId, info] of Object.entries(epochInfos.epochInfos)) {
218217
const chainInfo = info as ChainEpochInfo;
218+
console.log(`Chain ${chainId}: Last committed epoch ${chainInfo.lastCommittedEpoch}`);
219219
if (suggestedEpoch === 0 || Number(chainInfo.lastCommittedEpoch) < suggestedEpoch) {
220220
suggestedEpoch = Number(chainInfo.lastCommittedEpoch);
221221
}
222222
}
223-
console.log(`Last committed epoch: ${suggestedEpoch}`);
223+
console.log(`Suggested epoch (minimum): ${suggestedEpoch}`);
224224

225225
// Example 3: Get validator set
226226
console.log("\n=== Getting Validator Set ===");

src/gen/api/proto/v1/api_pb.ts

Lines changed: 8 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
// @generated by protoc-gen-es v2.6.3 with parameter "target=ts"
16+
// @generated from file google/api/annotations.proto (package google.api, syntax proto3)
17+
/* eslint-disable */
18+
19+
import type { GenExtension, GenFile } from "@bufbuild/protobuf/codegenv2";
20+
import { extDesc, fileDesc } from "@bufbuild/protobuf/codegenv2";
21+
import type { HttpRule } from "./http_pb";
22+
import { file_google_api_http } from "./http_pb";
23+
import type { MethodOptions } from "@bufbuild/protobuf/wkt";
24+
import { file_google_protobuf_descriptor } from "@bufbuild/protobuf/wkt";
25+
26+
/**
27+
* Describes the file google/api/annotations.proto.
28+
*/
29+
export const file_google_api_annotations: GenFile = /*@__PURE__*/
30+
fileDesc("Chxnb29nbGUvYXBpL2Fubm90YXRpb25zLnByb3RvEgpnb29nbGUuYXBpOksKBGh0dHASHi5nb29nbGUucHJvdG9idWYuTWV0aG9kT3B0aW9ucxiwyrwiIAEoCzIULmdvb2dsZS5hcGkuSHR0cFJ1bGVSBGh0dHBCrgEKDmNvbS5nb29nbGUuYXBpQhBBbm5vdGF0aW9uc1Byb3RvUAFaQWdvb2dsZS5nb2xhbmcub3JnL2dlbnByb3RvL2dvb2dsZWFwaXMvYXBpL2Fubm90YXRpb25zO2Fubm90YXRpb25zogIDR0FYqgIKR29vZ2xlLkFwacoCCkdvb2dsZVxBcGniAhZHb29nbGVcQXBpXEdQQk1ldGFkYXRh6gILR29vZ2xlOjpBcGliBnByb3RvMw", [file_google_api_http, file_google_protobuf_descriptor]);
31+
32+
/**
33+
* See `HttpRule`.
34+
*
35+
* @generated from extension: google.api.HttpRule http = 72295728;
36+
*/
37+
export const http: GenExtension<MethodOptions, HttpRule> = /*@__PURE__*/
38+
extDesc(file_google_api_annotations, 0);
39+

0 commit comments

Comments
 (0)