-
Notifications
You must be signed in to change notification settings - Fork 31
155 lines (149 loc) · 6.71 KB
/
test-deployments.yml
File metadata and controls
155 lines (149 loc) · 6.71 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: "Test Deployments"
concurrency:
group: deployments-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
merge_group:
push:
branches:
- "main"
jobs:
detect_deployments_changes:
runs-on: ubuntu-latest
outputs:
run_solana_deployment: ${{ steps.filter.outputs.run_deployment == 'true' || steps.filter.outputs.run_solana_deployment == 'true' }}
run_evm_deployment: ${{ steps.filter.outputs.run_deployment == 'true' || steps.filter.outputs.run_evm_deployment == 'true' }}
run_deployment: ${{ steps.filter.outputs.run_deployment == 'true' }}
run_crosschain_deployment: ${{ steps.filter.outputs.run_deployment == 'true' || steps.filter.outputs.run_solana_deployment == 'true' || steps.filter.outputs.run_evm_deployment == 'true' || steps.filter.outputs.run_crosschain_deployment == 'true' }}
steps:
- uses: actions/checkout@v4
- name: Detect changes
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
list-files: "shell"
filters: |
run_deployment:
- 'deployment/**'
- '.github/workflows/test-deployments.yml'
run_evm_deployment:
- 'chains/evm/gobindings/generated/**'
- 'chains/evm/deployment/**'
run_solana_deployment:
- 'chains/solana/gobindings/generated/**'
- 'chains/solana/deployment/**'
run_crosschain_deployment:
- 'integration-tests/deployment/**'
test-evm-deployments:
needs: [detect_deployments_changes]
if: ${{ needs.detect_deployments_changes.outputs.run_evm_deployment == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: chains/evm/deployment
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Test EVM Deployments
id: run-tests
continue-on-error: true
run: gotestsum --junitfile=test-results.xml --format=github-actions -- ./...
- name: Analyze and upload test results
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1
with:
junit-file-path: chains/evm/deployment/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) }}
test-solana-deployments:
needs: [detect_deployments_changes]
if: ${{ needs.detect_deployments_changes.outputs.run_solana_deployment == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: chains/solana/deployment
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Test Solana Deployments
id: run-tests
continue-on-error: true
run: gotestsum --junitfile=test-results.xml --format=github-actions -- ./...
- name: Analyze and upload test results
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1
with:
junit-file-path: chains/solana/deployment/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) }}
test-deployments:
needs: [detect_deployments_changes]
if: ${{ needs.detect_deployments_changes.outputs.run_deployment == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: deployment
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Test Crosschain Deployments
id: run-tests
continue-on-error: true
run: gotestsum --junitfile=test-results.xml --format=github-actions -- ./...
- name: Analyze and upload test results
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1
with:
junit-file-path: deployment/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) }}
test-deployments-crosschain:
needs: [detect_deployments_changes]
if: ${{ needs.detect_deployments_changes.outputs.run_crosschain_deployment == 'true' }}
runs-on: ubuntu-latest
defaults:
run:
working-directory: integration-tests/deployment
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version-file: go.mod
- name: Install gotestsum
run: go install gotest.tools/gotestsum@latest
- name: Install Solana CLI
run: |
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)" # always use latest stable release from solana
echo "PATH=$HOME/.local/share/solana/install/active_release/bin:$PATH" >> $GITHUB_ENV
- name: Test Crosschain Deployments
id: run-tests
continue-on-error: true
run: gotestsum --junitfile=test-results.xml --format=github-actions -- ./...
- name: Analyze and upload test results
uses: smartcontractkit/.github/actions/branch-out-upload@branch-out-upload/v1
with:
junit-file-path: integration-tests/deployment/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) }}