-
Notifications
You must be signed in to change notification settings - Fork 31
137 lines (133 loc) · 5.16 KB
/
test_smoke.yml
File metadata and controls
137 lines (133 loc) · 5.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Smoke tests (devenv)
on:
workflow_dispatch:
inputs:
ton_ref:
description: "Git ref (branch) of the TON relayer"
required: false
type: string
contract_version:
description: "Version of CCIP contracts to use"
required: false
type: string
chainlink_version:
description: "Chainlink version to use (e.g., develop, gh ref, etc.)"
required: false
type: string
custom_config:
description: "Extra config file(s), e.g. ton.toml,sui.toml"
required: false
type: string
pull_request:
push:
branches:
- "main"
defaults:
run:
working-directory: devenv
env:
DEPLOY_CONTRACT_VERSION: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.contract_version || '' }}
jobs:
smoke:
permissions:
id-token: write
contents: read
runs-on: ubuntu24.04-16cores-64GB
strategy:
matrix:
test:
- name: TestE2ESmoke
config: >-
${{
github.event_name == 'workflow_dispatch' &&
( inputs.custom_config != '' && inputs.custom_config || 'env.toml' )
|| 'env.toml'
}}
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Install Nix
uses: cachix/install-nix-action@02a151ada4993995686f9ed4f1be7cfbb229e56f # v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Checkout Chainlink TON
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ton_ref != '' }}
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: smartcontractkit/chainlink-ton
ref: ${{ github.event.inputs.ton_ref }}
path: chainlink-ton
- name: Build TON Contracts
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.contract_version == 'local' }}
run: |
pushd ../chainlink-ton/contracts
nix develop .#contracts -c yarn && yarn build
popd
mkdir -p ../contracts && mv ../chainlink-ton/contracts/build/ ../contracts/build
- name: Build CL Image For Ref
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.chainlink_version != '' }}
uses: ./.github/actions/build-cl
with:
ton_ref: ${{ github.event.inputs.ton_ref || '' }}
chainlink_version: ${{ github.event.inputs.chainlink_version }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- name: Install Just
uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3
with:
just-version: "1.40.0"
- name: Authenticate to AWS ECR
uses: ./.github/actions/aws-ecr-auth
with:
role-to-assume: ${{ secrets.CCIP_IAM_ROLE }}
aws-region: us-east-1
registry-type: public
- name: Authenticate to AWS ECR (JD)
uses: ./.github/actions/aws-ecr-auth
with:
role-to-assume: ${{ secrets.CCV_IAM_ROLE }}
aws-region: us-west-2
registry-type: private
registries: ${{ secrets.JD_REGISTRY }}
- name: Set up Go
uses: actions/setup-go@v6 # v6
with:
cache: true
go-version-file: devenv/go.mod
cache-dependency-path: |
devenv/go.sum
- name: Download Go dependencies
run: |
export GOPRIVATE=github.com/smartcontractkit/*
if [ -n "${{ inputs.ton_ref }}" ]; then
go get github.com/smartcontractkit/chainlink-ton/devenv@${{ inputs.ton_ref }}
go get github.com/smartcontractkit/chainlink-ton/deployment@${{ inputs.ton_ref }}
go get github.com/smartcontractkit/chainlink-ton@${{ inputs.ton_ref }}
go mod tidy
fi
go mod download
- name: Run CCIP environment with config
env:
JD_IMAGE: ${{ secrets.JD_IMAGE }}
run: |
cd cmd/ccip && go install . && cd -
ccip u ${{ matrix.test.config }}
sleep 120 # wait for nodes to be ready, need a better way here
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Smoke Tests
working-directory: devenv/tests/e2e
id: run-tests
continue-on-error: true
run: gotestsum --junitfile=test-results.xml --format=github-actions -- -run ${{ matrix.test.name }} -timeout 20m
- name: Analyze and upload test results
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1
with:
junit-file-path: devenv/tests/e2e/test-results.xml
trunk-org-slug: chainlink
trunk-previous-step-outcome: ${{ steps.run-tests.outcome }}
trunk-token: ${{ secrets.TRUNK_API_KEY }}
trunk-job-url: ${{ format('https://github.com/{0}/actions/runs/{1}/job/{2}/attempts/{3}', github.repository, github.run_id, job.check_run_id, github.run_attempt) }}