-
Notifications
You must be signed in to change notification settings - Fork 19
132 lines (127 loc) · 5.1 KB
/
integration-tests-soak.yml
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
name: Integration Tests - Soak
on:
push:
branches:
- main
- develop
workflow_dispatch:
inputs:
cl_branch_ref:
description: Chainlink repo branch to integrate with
required: true
default: develop
type: string
l2_rpc_url:
description: Override default RPC url which points to local devnet (Optional)
required: false
type: string
node_count:
description: Number of ocr nodes
required: true
default: 5
type: string
ttl:
description: TTL for namespace
required: true
default: 72h
type: string
test_duration:
description: Duration of soak
required: true
default: 72h
type: string
private_key:
description: Private key, ignore for devnet
required: false
type: string
account:
description: Account address, ignore for devnet
required: false
# Only run 1 of this workflow at a time per PR
concurrency:
group: integration-tests-starknet-${{ github.ref }}
cancel-in-progress: true
env:
ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-starknet-tests:${{ github.sha }}
jobs:
build_custom_chainlink_image:
name: Build Custom CL Image
runs-on: ubuntu-latest
environment: integration
permissions:
id-token: write
contents: read
steps:
- name: Check if image exists
id: check-image
uses: smartcontractkit/chainlink-github-actions/docker/image-exists@2c9f401149f6c25fb632067b7e6626aebeee5d69 # v2.1.6
with:
repository: chainlink
tag: starknet.${{ github.sha }}
AWS_REGION: ${{ secrets.QA_AWS_REGION }}
AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
- name: Build Image
if: steps.check-image.outputs.exists == 'false'
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/build-image@2c9f401149f6c25fb632067b7e6626aebeee5d69
with:
cl_repo: smartcontractkit/chainlink
# By default we are integrating with CL develop
cl_ref: ${{ github.event.inputs.cl_branch_ref }}
# commit of the caller branch
dep_starknet_sha: ${{ github.event.pull_request.head.sha || github.sha }}
push_tag: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink:starknet.${{ github.sha }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_PRIVATE_GHA_PULL: ${{ secrets.QA_PRIVATE_GHA_PULL }}
- name: Print Chainlink Image Built
run: |
echo "### chainlink image tag used for this test run :link:" >>$GITHUB_STEP_SUMMARY
echo "\`starknet.${{ github.sha }}\`" >>$GITHUB_STEP_SUMMARY
run_tests:
name: Run Soak Tests
runs-on: ubuntu-latest
needs: [ build_custom_chainlink_image ]
environment: integration
env:
CHAINLINK_ENV_USER: ${{ github.actor }}
L2_RPC_URL: ${{ github.event.inputs.l2_rpc_url }}
TEST_DURATION: ${{ github.event.inputs.test_duration }}
NODE_COUNT: ${{ github.event.inputs.node_count }}
PRIVATE_KEY: ${{ github.event.inputs.private_key }}
ACCOUNT: ${{ github.event.inputs.account }}
TTL: ${{ github.event.inputs.ttl }}
DETACH_RUNNER: true
TEST_SUITE: soak
TEST_ARGS: -test.timeout ${{ github.event.inputs.ttl }}
TEST_LOG_LEVEL: debug
INTERNAL_DOCKER_REPO: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com
permissions:
checks: write
pull-requests: write
id-token: write
contents: read
steps:
- name: Checkout the repo
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Install Nix
uses: cachix/install-nix-action@29bd9290ef037a3ecbdafe83cbd2185e9dd0fa0a # v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build Image
uses: ./.github/actions/build-test-image
with:
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ACCOUNT_NUMBER: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}
- name: Run Tests
uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@2c9f401149f6c25fb632067b7e6626aebeee5d69 # v2.1.2
with:
test_command_to_run: nix develop -c make test-integration-soak-ci
test_download_vendor_packages_command: cd integration-tests && nix develop -c go mod download
cl_repo: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
cl_image_tag: starknet.${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
go_mod_path: ./integration-tests/go.mod
QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
QA_KUBECONFIG: ${{ secrets.QA_KUBECONFIG }}