Skip to content

Commit

Permalink
Merge branch 'develop' into tt_1209_k8s_cl_node_toml_from_test_config
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudhwarrier authored Jun 24, 2024
2 parents c904a1b + b4029c5 commit 5310790
Show file tree
Hide file tree
Showing 132 changed files with 3,670 additions and 1,194 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-avocados-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

add test for v23 #added
5 changes: 5 additions & 0 deletions .changeset/pretty-dancers-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#changed Expand EVM implementation compatibility pipeline
5 changes: 5 additions & 0 deletions .changeset/tall-walls-agree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal upgrade keystone contracts to 0.8.24
5 changes: 5 additions & 0 deletions .changeset/wise-wasps-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"chainlink": patch
---

#internal Add loggercheck linter to verify that \*w logging methods have even number of args.
6 changes: 5 additions & 1 deletion .github/actions/build-chainlink-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ inputs:
dep_evm_sha:
description: The chainlink-evm commit sha to use in go deps
required: false
check_image_exists:
description: "Check if the image exists in ECR before building"
required: false
default: 'false'

runs:
using: composite
steps:
- name: Check if image exists
if: ${{ inputs.dep_evm_sha != '' }}
if: ${{ inputs.dep_evm_sha != '' || inputs.check_image_exists == 'true'}}
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@fc3e0df622521019f50d772726d6bf8dc919dd38 # v2.3.19
with:
Expand Down
85 changes: 50 additions & 35 deletions .github/actions/notify-slack-jobs-result/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ inputs:
slack_thread_ts:
description: "The Slack thread timestamp to post the message to, handy for keeping multiple related results in a single thread"
required: false
base64_parsed_results:
description: "Base64 encoded parsed results to use"
required: false

runs:
using: composite
Expand All @@ -33,43 +36,54 @@ runs:
shell: bash
id: test-results
run: |
# I feel like there's some clever, fully jq way to do this, but I ain't got the motivation to figure it out
echo "Querying test results at https://api.github.com/repos/${{inputs.github_repository}}/actions/runs/${{ inputs.workflow_run_id }}/jobs"
# we can get a maximum of 100 jobs per page, after that we need to start using pagination
PARSED_RESULTS=$(curl \
-H "Authorization: Bearer ${{ inputs.github_token }}" \
'https://api.github.com/repos/${{inputs.github_repository}}/actions/runs/${{ inputs.workflow_run_id }}/jobs?per_page=100' \
| jq -r --arg pattern "${{ inputs.github_job_name_regex }}" '.jobs[]
| select(.name | test($pattern)) as $job
| $job.steps[]
| select(.name == "Run Tests")
| { conclusion: (if .conclusion == "success" then ":white_check_mark:" else ":x:" end), cap: ("*" + ($job.name | capture($pattern).cap) + "*"), html_url: $job.html_url }')
if [ -n "${{ inputs.base64_parsed_results }}" ]; then
echo "Using base64 parsed results"
PARSED_RESULTS=$(echo "${{ inputs.base64_parsed_results }}" | base64 -d)
else
go install github.com/smartcontractkit/chainlink-testing-framework/tools/[email protected]
PATH=$PATH:$(go env GOPATH)/bin
export PATH
workflowresultparser -workflowRunID ${{ inputs.workflow_run_id }} -githubToken ${{ inputs.github_token }} -githubRepo "${{ inputs.github_repository }}" -jobNameRegex "${{ inputs.github_job_name_regex }}" -outputFile=output.json
if [ ! -f output.json ]; then
PARSED_RESULTS='""'
else
PARSED_RESULTS=$(cat output.json | jq -c "select(has(\"results\")) | .results[]")
fi
fi
echo "Parsed Results:"
echo $PARSED_RESULTS
ALL_SUCCESS=true
echo "Checking for failures"
echo "$PARSED_RESULTS" | jq -s | jq -r '.[] | select(.conclusion != ":white_check_mark:")'
for row in $(echo "$PARSED_RESULTS" | jq -s | jq -r '.[] | select(.conclusion != ":white_check_mark:")'); do
ALL_SUCCESS=false
break
done
echo "Success: $ALL_SUCCESS"
echo all_success=$ALL_SUCCESS >> $GITHUB_OUTPUT
FORMATTED_RESULTS=$(echo $PARSED_RESULTS | jq -s '[.[]
| {
conclusion: .conclusion,
cap: .cap,
html_url: .html_url
}
]
| map("{\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"<\(.html_url)|\(.cap)>: \(.conclusion)\"}}")
| join(",")')
if [ "$PARSED_RESULTS" != '""' ]; then
echo "Checking for failures"
echo "$PARSED_RESULTS" | jq -s | jq -r '.[] | select(.conclusion != ":white_check_mark:")'
for row in $(echo "$PARSED_RESULTS" | jq -s | jq -r '.[] | select(.conclusion != ":white_check_mark:")'); do
ALL_SUCCESS=false
break
done
echo "Success: $ALL_SUCCESS"
echo all_success=$ALL_SUCCESS >> $GITHUB_OUTPUT

FORMATTED_RESULTS=$(echo $PARSED_RESULTS | jq -s '[.[]
| {
conclusion: .conclusion,
cap: .cap,
html_url: .html_url
}
]
| map("{\"type\": \"section\", \"text\": {\"type\": \"mrkdwn\", \"text\": \"<\(.html_url)|\(.cap)>: \(.conclusion)\"}}")
| join(",")')
else
echo "Nothing to post, no results found"
exit 0
fi

echo "Formatted Results:"
echo $FORMATTED_RESULTS

Expand All @@ -82,6 +96,7 @@ runs:
echo results=$CLEAN_RESULTS >> $GITHUB_OUTPUT
- name: Post Results
uses: slackapi/slack-github-action@6c661ce58804a1a20f6dc5fbee7f0381b469e001 # v1.25.0
if: steps.test-results.outputs.results != ''
env:
SLACK_BOT_TOKEN: ${{ inputs.slack_bot_token }}
with:
Expand All @@ -108,4 +123,4 @@ runs:
]
}
]
}
}
Loading

0 comments on commit 5310790

Please sign in to comment.