-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'ccip-develop' into CCIP-2836
- Loading branch information
Showing
39 changed files
with
2,444 additions
and
1,569 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# All code generation should be run prior to pull request. Running it again should not produce a diff. | ||
name: "Codegen Verifier" | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- 'ccip-develop' | ||
|
||
jobs: | ||
codegen-verifier: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
go-version: ['1.21'] | ||
defaults: | ||
run: | ||
working-directory: . | ||
steps: | ||
- uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
- name: Setup Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Display Go version | ||
run: go version | ||
- name: Re-Generate mocks | ||
run: | | ||
rm -rf mocks # delete all mocks to ensure any deprecated files have been removed. | ||
make generate | ||
- name: Tidy | ||
run: go mod tidy | ||
- name: ensure no changes | ||
run: | | ||
set -e | ||
git_status=$(git status --porcelain=v1) | ||
if [ ! -z "$git_status" ]; then | ||
git status | ||
git diff | ||
echo "Error: modified files detected, run 'make generate' / 'go mod tidy'." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
with-expecter: true | ||
filename: "{{.InterfaceName | snakecase}}.go" | ||
dir: mocks/{{ replaceAll .InterfaceDirRelative "internal" "internal_" }} | ||
packages: | ||
github.com/smartcontractkit/chainlink-ccip/execute/types: | ||
interfaces: | ||
TokenDataReader: | ||
github.com/smartcontractkit/chainlink-ccip/execute/internal/gen: | ||
interfaces: | ||
ExecutePluginCodec: | ||
github.com/smartcontractkit/chainlink-ccip/internal/reader: | ||
interfaces: | ||
HomeChain: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
TEST_COUNT ?= 10 | ||
COVERAGE_FILE ?= coverage.out | ||
|
||
ensure_go_1_21: | ||
build: ensure_go_version | ||
go build -v ./... | ||
|
||
generate: ensure_go_version | ||
go install github.com/vektra/mockery/v2@v2.43.0 | ||
mockery | ||
|
||
test: ensure_go_version | ||
go test -race -fullpath -shuffle on -count $(TEST_COUNT) -coverprofile=$(COVERAGE_FILE) ./... | ||
|
||
lint: ensure_go_version | ||
golangci-lint run -c .golangci.yml | ||
|
||
ensure_go_version: | ||
@go version | grep -q 'go1.21' || (echo "Please use go1.21" && exit 1) | ||
|
||
ensure_golangcilint_1_59: | ||
@golangci-lint --version | grep -q '1.59' || (echo "Please use golangci-lint 1.59" && exit 1) | ||
|
||
test: ensure_go_1_21 | ||
go test -race -fullpath -shuffle on -count 10 ./... | ||
|
||
lint: ensure_go_1_21 | ||
golangci-lint run -c .golangci.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Package gen wraps an external type to generate a mock object. | ||
package gen | ||
|
||
import cciptypes "github.com/smartcontractkit/chainlink-common/pkg/types/ccipocr3" | ||
|
||
// ExecutePluginCodec is defined in chainlink-common. | ||
type ExecutePluginCodec interface { | ||
cciptypes.ExecutePluginCodec | ||
} |
Oops, something went wrong.