Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions .github/workflows/template-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Template Check

on:
pull_request:
types: [opened, synchronize, reopened]

concurrency:
group: template-compat-${{ github.head_ref || github.ref }}
cancel-in-progress: true

# Blocking merge gate for templates changed in the PR.
#
# Checks performed per template:
# TypeScript: YAML validation, bun install, typecheck, cre-compile to WASM
# Go: YAML validation, go mod verify, go vet, go build (GOOS=wasip1 GOARCH=wasm)
#
# The SDK version used is captured from the installed package (TS) or go.mod (Go)
# and printed in the Actions log when a check fails.

permissions:
contents: read

jobs:
template-check:
runs-on: ubuntu-latest

defaults:
run:
shell: bash {0}

steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0 # full history needed for git diff against base branch

# Go is required for Go template builds (GOOS=wasip1 GOARCH=wasm).
# GOTOOLCHAIN=auto lets Go download the exact toolchain declared in go.mod
# (e.g. "toolchain go1.24.10") if it differs from the installed version.
- name: Setup Go
uses: actions/setup-go@v5

Check warning on line 41 in .github/workflows/template-check.yml

View workflow job for this annotation

GitHub Actions / Validate Workflow Changes

1. Action is using node20. Versions older than node24 are being deprecated. Use a newer version of the action if possible. (node-version / warning)
with:
go-version: 'stable'
cache: false # cache managed explicitly below
env:
GOTOOLCHAIN: auto

# Node + npm are required for TypeScript template checks.
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: '24'

# cre-compile is shipped with a bun shebang; npx invokes it as /usr/bin/env bun.
# Match local dev machines where Bun is installed alongside Node.
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2

# Cache Go module downloads. Keyed on all go.sum files so any new module
# version busts the cache while unchanged templates stay fast.
- name: Cache Go modules
uses: actions/cache@v5
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-templates-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-templates-

# Cache npm package downloads. Multiple templates sharing the same
# @chainlink/cre-sdk version (e.g. ^1.5.0) will hit the cache after
# the first install, avoiding repeated network downloads.
- name: Cache npm
uses: actions/cache@v5
with:
path: ~/.npm
key: ${{ runner.os }}-npm-templates-${{ hashFiles('**/package.json') }}
restore-keys: ${{ runner.os }}-npm-templates-

- name: Run template checks
env:
BASE_REF: ${{ github.base_ref }}
RESULTS_FILE: /tmp/template-results.json
GOTOOLCHAIN: auto
run: ./scripts/check-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "UNLICENSED",
"dependencies": {
"@chainlink/cre-sdk": "^1.5.0"
"@chainlink/cre-sdk": "^1.6.0"
},
"devDependencies": {
"typescript": "5.9.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "UNLICENSED",
"dependencies": {
"@chainlink/cre-sdk": "^1.5.0"
"@chainlink/cre-sdk": "^1.6.0"
},
"devDependencies": {
"typescript": "5.9.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "UNLICENSED",
"dependencies": {
"@chainlink/cre-sdk": "^1.5.0",
"@chainlink/cre-sdk": "^1.6.0",
"@noble/hashes": "^1.7.2"
},
"devDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "UNLICENSED",
"dependencies": {
"@chainlink/cre-sdk": "^1.5.0",
"@chainlink/cre-sdk": "^1.6.0",
"viem": "2.34.0",
"zod": "3.25.76"
},
Expand Down
16 changes: 8 additions & 8 deletions building-blocks/read-data-feeds/read-mvr-data-feeds-go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,14 @@ github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA=
github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250918131840-564fe2776a35 h1:hhKdzgNZT+TnohlmJODtaxlSk+jyEO79YNe8zLFtp78=
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20250918131840-564fe2776a35/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q=
github.com/smartcontractkit/cre-sdk-go v1.0.0 h1:O52/QDmw/W8SJ7HQ9ASlVx7alSMGsewjL0Y8WZmgf5w=
github.com/smartcontractkit/cre-sdk-go v1.0.0/go.mod h1:CQY8hCISjctPmt8ViDVgFm4vMGLs5fYI198QhkBS++Y=
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0 h1:t2bzRHnqkyxvcrJKSsKPmCGLMjGO97ESgrtLCnTIEQw=
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0/go.mod h1:VVJ4mvA7wOU1Ic5b/vTaBMHEUysyxd0gdPPXkAu8CmY=
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.0.0-beta.0 h1:Tui4xQVln7Qtk3CgjBRgDfihgEaAJy2t2MofghiGIDA=
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.0.0-beta.0/go.mod h1:PWyrIw16It4TSyq6mDXqmSR0jF2evZRKuBxu7pK1yDw=
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20251103211352-4c2e6505f4d6 h1:Zmwr/k+7JM/3FRf4AcK9SqLdQ+ZmIRt3LBALa+T1Igg=
github.com/smartcontractkit/chainlink-protos/cre/go v0.0.0-20251103211352-4c2e6505f4d6/go.mod h1:jUC52kZzEnWF9tddHh85zolKybmLpbQ1oNA4FjOHt1Q=
github.com/smartcontractkit/cre-sdk-go v1.0.1-0.20251103212936-f87c1b6768b7 h1:sKGjw83NUOSyVOvYUTNdbUzd35CuIS0hDsmNb4CPrg4=
github.com/smartcontractkit/cre-sdk-go v1.0.1-0.20251103212936-f87c1b6768b7/go.mod h1:CQY8hCISjctPmt8ViDVgFm4vMGLs5fYI198QhkBS++Y=
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0.0.20251103212936-f87c1b6768b7 h1:riXijgLlYw3hu7YGMAuf6o1G1MYyLhqENoYqEz79HTU=
github.com/smartcontractkit/cre-sdk-go/capabilities/blockchain/evm v1.0.0-beta.0.0.20251103212936-f87c1b6768b7/go.mod h1:mbkNee1UMkB13Dab+EMwlkPbYY2Qwj5+SaOtYWagY8s=
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.0.0-beta.0.0.20251103212936-f87c1b6768b7 h1:mNArf+I7g6h9WLH+j65w6epY3CygfJy13HOoVRS42KQ=
github.com/smartcontractkit/cre-sdk-go/capabilities/scheduler/cron v1.0.0-beta.0.0.20251103212936-f87c1b6768b7/go.mod h1:PWyrIw16It4TSyq6mDXqmSR0jF2evZRKuBxu7pK1yDw=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe h1:nbdqkIGOGfUAD54q1s2YBcBz/WcsxCO9HUQ4aGV5hUw=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"type": "module",
"dependencies": {
"@chainlink/cre-sdk": "^1.5.0",
"@chainlink/cre-sdk": "^1.6.0",
"viem": "2.34.0"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "UNLICENSED",
"dependencies": {
"@chainlink/cre-sdk": "^1.5.0",
"@chainlink/cre-sdk": "^1.6.0",
"viem": "2.34.0",
"zod": "3.25.76"
},
Expand Down
Loading
Loading