Skip to content

Commit 1f3ee23

Browse files
committed
Merge branch 'main' into tt-1772-wasp-o1-mini
2 parents 14b1185 + dce4e1c commit 1f3ee23

File tree

305 files changed

+14705
-6316
lines changed

Some content is hidden

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

305 files changed

+14705
-6316
lines changed

.github/workflows/framework-golden-tests.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
filters: |
6060
src:
6161
- 'framework/**'
62+
- '.github/workflows/framework-golden-tests.yml'
6263
- name: Set up Go
6364
uses: actions/setup-go@v4
6465
with:
@@ -81,3 +82,10 @@ jobs:
8182
CTF_CONFIGS: ${{ matrix.test.config }}
8283
run: |
8384
go test -timeout ${{ matrix.test.timeout }} -v -count ${{ matrix.test.count }} -run ${{ matrix.test.name }}
85+
- name: Upload Logs
86+
if: always()
87+
uses: actions/upload-artifact@v3
88+
with:
89+
name: container-logs-${{ matrix.test.name }}
90+
path: framework/examples/myproject/logs
91+
retention-days: 1

.github/workflows/framework.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
defaults:
1010
run:
1111
working-directory: framework
12+
env:
13+
CTF_JD_IMAGE: ${{ secrets.CTF_JD_IMAGE }}
1214
runs-on: ubuntu-latest
1315
permissions:
1416
id-token: write
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Generate go-docs
2+
3+
on:
4+
pull_request:
5+
types:
6+
- labeled
7+
- reopened
8+
- synchronize
9+
10+
jobs:
11+
generate_docs_new_pr:
12+
if: ${{ contains(github.event.issue.labels.*.name, 'generate_go_docs') }}
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
pull-requests: write
17+
repository-projects: read
18+
19+
steps:
20+
- name: Checkout current branch
21+
uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Setup Git
26+
run: |
27+
git config user.name "github-actions[bot]"
28+
git config user.email "github-actions[bot]@users.noreply.github.com"
29+
30+
- name: Get PR details
31+
id: pr-details
32+
run: |
33+
echo "pr_number=$(jq -r .pull_request.number <<< "$GITHUB_EVENT_PATH")" >> $GITHUB_OUTPUT
34+
echo "pr_branch=$(jq -r .pull_request.head.ref <<< "$GITHUB_EVENT_PATH")" >> $GITHUB_OUTPUT
35+
echo "base_commit=${{ github.event.pull_request.base.sha }}" >> $GITHUB_OUTPUT
36+
echo "head_commit=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
37+
38+
- name: Install go doc generator
39+
shell: bash
40+
run: |
41+
go install github.com/smartcontractkit/generate-go-function-docs@latest
42+
43+
- name: Install gopls
44+
shell: bash
45+
run: |
46+
go install golang.org/x/tools/gopls@latest
47+
48+
- name: Create a new branch
49+
run: |
50+
git checkout -b ${{ steps.pr-details.outputs.pr_branch }}-docs
51+
52+
- name: Generate go docs
53+
shell: bash
54+
env:
55+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
56+
run: |
57+
generate-go-function-docs diff -b ${{ steps.pr-details.outputs.base_commit }} -c ${{ steps.pr-details.outputs.head_commit }} -g fake_slash
58+
59+
- name: Make sure code still compiles
60+
run: |
61+
go mod tidy
62+
go mod vendor
63+
go build ./...
64+
65+
- name: Commit changes
66+
run: |
67+
git add .
68+
git commit -m "Add automatically generated go documentation"
69+
git push origin ${{ steps.pr-details.outputs.pr_branch }}-docs
70+
71+
- name: Create a new PR targeting current PR
72+
uses: peter-evans/create-pull-request@v5
73+
with:
74+
token: ${{ secrets.GITHUB_TOKEN }}
75+
base: ${{ env.pr_branch }}
76+
branch: ${{ steps.pr-details.outputs.pr_branch }}-docs
77+
title: "Go docs for PR#${{ env.pr_number }}"
78+
body: "This PR contains automatically generated go documentation for the PR#${{ env.pr_number }}. Please review the changes."

.github/workflows/k8s-e2e.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: (k8s package) E2E tests
2-
on:
3-
pull_request:
2+
# disabling for now, as they always fail
3+
#on:
4+
# pull_request:
45

56
concurrency:
67
group: e2e-tests-k8s-${{ github.ref }}

.github/workflows/k8s-publish-test-base-image.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ on:
55
# we only need base image for k8s based tests
66
- 'lib/v*'
77
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Tag for the base image'
11+
required: true
12+
type: string
813

914
jobs:
1015
publish_test_base_image:
@@ -19,12 +24,20 @@ jobs:
1924
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
2025

2126
- name: Strip "lib/" from github.ref_name
27+
if: ${{ github.event_name == 'push' }}
2228
run: |
2329
stripped_ref_name="${GITHUB_REF//refs\/tags\/lib\//}"
2430
# disabling as the string containing variable is double-quotted as a whole, no need to quote each variable separately
2531
# shellcheck disable=SC2086
2632
echo "BASE_IMAGE_TAG=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image:$stripped_ref_name" >> $GITHUB_ENV
2733
34+
- name: Export base image tag for workflow dispatch
35+
if: ${{ github.event_name == 'workflow_dispatch' }}
36+
shell: bash
37+
run: |
38+
# shellcheck disable=SC2086
39+
echo "BASE_IMAGE_TAG=${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/test-base-image:${{ github.event.inputs.tag }}" >> $GITHUB_ENV
40+
2841
- name: Build Base Image
2942
uses: smartcontractkit/chainlink-github-actions/docker/build-push@d2f9642bcc24a73400568756f24b72c188ac7a9a # v2.3.31
3043
with:

.github/workflows/wasp-test-e2e.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
name: WASP E2E tests
2-
on: [push]
2+
# disabling for now, as they always fail
3+
#on:
4+
# push:
35
concurrency:
46
group: ${{ github.workflow }}-${{ github.ref }}
57
cancel-in-progress: true

.golangci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ linters:
1313
- unused
1414
# extra
1515
- exhaustive
16-
- exportloopref
16+
- copyloopvar
1717
- revive
1818
- goimports
1919
- gosec

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
golang 1.21.9
1+
golang 1.23.3
22
nodejs 18.20.3
33
k3d 5.6.3
44
act 0.2.52
5-
golangci-lint 1.57.2
5+
golangci-lint 1.62.0
66
actionlint 1.6.26
77
shellcheck 0.9.0
88
helm 3.15.2

book/README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1-
# Chainlink Testing Framework Docs
2-
3-
We use [mdBook](https://github.com/rust-lang/mdBook) for our docs. They can be found [here](https://smartcontractkit.github.io/chainlink-testing-framework/).
4-
5-
## Development
6-
7-
First [install Rust](https://doc.rust-lang.org/cargo/getting-started/installation.html), then [mdbook](https://github.com/rust-lang/mdBook).
8-
9-
```sh
10-
# Install mdBook
1+
## MDBook
2+
Install [mdbook](https://github.com/rust-lang/mdBook)
3+
```
114
cargo install mdbook && \
125
cargo install mdbook-alerts && \
13-
cargo install mdbook-cmdrun
14-
# Run the mdBook
6+
cargo install mdbook-cmdrun &&
7+
cargo install mdbook-mermaid
8+
```
9+
10+
Run it locally
11+
```
1512
make run
1613
```
14+
Open your browser [here](http://localhost:9999/)
1715

18-
Visit [localhost:9999](http://localhost:9999) to see your local version.
16+
GitHub hosted [version](https://smartcontractkit.github.io/chainlink-testing-framework/overview.html)

book/book.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ build-dir = "docs"
1010

1111
[output.html]
1212
default-theme = "ayu"
13+
additional-js = ["mermaid.min.js", "mermaid-init.js"]
1314

1415
[preprocessor.alerts]
15-
[preprocessor.cmdrun]
16+
[preprocessor.cmdrun]
17+
18+
[preprocessor.mermaid]
19+
command = "mdbook-mermaid"

0 commit comments

Comments
 (0)