forked from smartcontractkit/ccip
-
Notifications
You must be signed in to change notification settings - Fork 5
148 lines (148 loc) · 5.98 KB
/
integration-chaos-tests.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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#name: Integration Chaos Test
#on:
# schedule:
# - cron: "0 0 * * *"
# push:
# tags:
# - "*"
# workflow_dispatch:
#
#env:
# CHAINLINK_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink
# ENV_JOB_IMAGE: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink-tests:${{ github.sha }}
# TEST_SUITE: chaos
# TEST_ARGS: -test.timeout 1h
# CHAINLINK_COMMIT_SHA: ${{ github.sha }}
# CHAINLINK_ENV_USER: ${{ github.actor }}
# TEST_LOG_LEVEL: debug
#
#jobs:
# build-chainlink:
# environment: integration
# permissions:
# id-token: write
# contents: read
# name: Build Chainlink Image
# runs-on: ubuntu-latest
# steps:
# - name: Checkout the repo
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# - name: Check if image exists
# id: check-image
# uses: smartcontractkit/chainlink-github-actions/docker/image-exists@e865e376b8c2d594028c8d645dd6c47169b72974 # v2.2.16
# with:
# repository: chainlink
# tag: ${{ 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@e865e376b8c2d594028c8d645dd6c47169b72974 # v2.2.16
# with:
# cl_repo: smartcontractkit/chainlink
# cl_ref: ${{ github.sha }}
# push_tag: ${{ secrets.QA_AWS_ACCOUNT_NUMBER }}.dkr.ecr.${{ secrets.QA_AWS_REGION }}.amazonaws.com/chainlink:${{ github.sha }}
# QA_AWS_REGION: ${{ secrets.QA_AWS_REGION }}
# QA_AWS_ROLE_TO_ASSUME: ${{ secrets.QA_AWS_ROLE_TO_ASSUME }}
# - name: Print Chainlink Image Built
# id: push
# run: |
# echo "### chainlink node image tag used for this test run :link:" >>$GITHUB_STEP_SUMMARY
# echo "\`${GITHUB_SHA}\`" >>$GITHUB_STEP_SUMMARY
# - name: Collect Metrics
# if: always()
# id: collect-gha-metrics
# uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
# with:
# basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
# hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
# this-job-name: Build Chainlink Image
# continue-on-error: true
#
# build-test-runner:
# environment: integration
# permissions:
# id-token: write
# contents: read
# name: Build Test Runner Image
# runs-on: ubuntu-latest
# steps:
# - name: Checkout the repo
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# - name: Build Test 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: Collect Metrics
# if: always()
# id: collect-gha-metrics
# uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
# with:
# basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
# hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
# this-job-name: Build Test Runner Image
# continue-on-error: true
#
# chaos-tests:
# environment: integration
# permissions:
# checks: write
# pull-requests: write
# id-token: write
# contents: read
# name: EVM Pods Chaos Tests
# runs-on: ubuntu-latest
# needs: [build-test-runner, build-chainlink]
# steps:
# - name: Collect Metrics
# id: collect-gha-metrics
# uses: smartcontractkit/push-gha-metrics-action@d1618b772a97fd87e6505de97b872ee0b1f1729a # v2.0.2
# with:
# basic-auth: ${{ secrets.GRAFANA_CLOUD_BASIC_AUTH }}
# hostname: ${{ secrets.GRAFANA_CLOUD_HOST }}
# this-job-name: EVM Pods Chaos Tests
# test-results-file: '{"testType":"go","filePath":"/tmp/gotest.log"}'
# continue-on-error: true
# - name: Checkout the repo
# uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# - name: Prepare Base64 TOML config
# env:
# CHAINLINK_VERSION: ${{ github.sha }}
# run: |
# echo ::add-mask::$CHAINLINK_IMAGE
#
# cat << EOF > config.toml
# [Network]
# selected_networks=["SIMULATED"]
#
# [ChainlinkImage]
# image="$CHAINLINK_IMAGE"
# version="$CHAINLINK_VERSION"
# EOF
#
# BASE64_CONFIG_OVERRIDE=$(cat config.toml | base64 -w 0)
# echo ::add-mask::$BASE64_CONFIG_OVERRIDE
# echo "BASE64_CONFIG_OVERRIDE=$BASE64_CONFIG_OVERRIDE" >> $GITHUB_ENV
# - name: Run Tests
# uses: smartcontractkit/chainlink-github-actions/chainlink-testing-framework/run-tests@e865e376b8c2d594028c8d645dd6c47169b72974 # v2.2.16
# with:
# test_command_to_run: cd integration-tests && go test -timeout 1h -count=1 -json -test.parallel 11 ./chaos 2>&1 | tee /tmp/gotest.log | gotestfmt
# test_download_vendor_packages_command: cd ./integration-tests && go mod download
# cl_repo: ${{ env.CHAINLINK_IMAGE }}
# cl_image_tag: ${{ github.sha }}
# artifacts_location: ./integration-tests/chaos/logs
# publish_check_name: EVM Pods Chaos Test Results
# 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 }}
# - name: Upload test log
# uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
# if: failure()
# with:
# name: Test Results Log
# path: /tmp/gotest.log
# retention-days: 7