-
Notifications
You must be signed in to change notification settings - Fork 2k
158 lines (142 loc) · 5.36 KB
/
test-suite-e2e-tests.yml
File metadata and controls
158 lines (142 loc) · 5.36 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
156
157
158
name: Test Suite E2E Tests
on:
workflow_dispatch:
inputs:
gateway_version:
description: "Gateway Image Version"
default: ""
type: string
host_version:
description: "Host Image Version"
default: ""
type: string
coprocessor_version:
description: "Coprocessor Image Version"
default: ""
type: string
db_migration_version:
description: "Coprocessor DB Migration Image Version"
default: ""
type: string
connector_version:
description: "Connector Version"
default: ""
type: string
test_suite_version:
description: "Test Suite E2E Image Version"
default: ""
type: string
core_version:
description: "KMS Core Version"
default: ""
type: string
relayer_version:
description: "Relayer Image Version"
default: ""
type: string
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check-changes:
permissions:
actions: 'read'
contents: 'read'
pull-requests: 'read'
runs-on: ubuntu-latest
outputs:
changes-fhevm: ${{ steps.filter.outputs.fhevm }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
fhevm:
- 'test-suite/fhevm/**'
fhevm-e2e-test:
needs: check-changes
if: ${{ needs.check-changes.outputs.changes-fhevm == 'true' || github.event_name == 'release' || github.event_name == 'workflow_dispatch' }}
permissions:
contents: "read"
id-token: "write"
packages: "read"
runs-on: large_ubuntu_32
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Docker
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_READ_TOKEN }}
- name: Set version from release
if: github.event_name == 'release'
run: |
{
echo "GATEWAY_VERSION=${{ github.ref_name }}"
echo "HOST_VERSION=${{ github.ref_name }}"
echo "COPROCESSOR_VERSION=${{ github.ref_name }}"
echo "DB_MIGRATION_VERSION=${{ github.ref_name }}"
echo "CONNECTOR_VERSION=${{ github.ref_name }}"
echo "TEST_SUITE_VERSION=${{ github.ref_name }}"
} >> "$GITHUB_ENV"
- name: Deploy fhevm Stack
working-directory: test-suite/fhevm
env:
GATEWAY_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.gateway_version || env.GATEWAY_VERSION }}
HOST_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.host_version || env.HOST_VERSION }}
COPROCESSOR_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.coprocessor_version || env.COPROCESSOR_VERSION }}
DB_MIGRATION_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.db_migration_version || env.DB_MIGRATION_VERSION }}
CONNECTOR_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.connector_version || env.CONNECTOR_VERSION }}
TEST_SUITE_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.test_suite_version || env.TEST_SUITE_VERSION }}
CORE_VERSION: ${{ inputs.core_version }}
RELAYER_VERSION: ${{ inputs.relayer_version }}
run: |
./fhevm-cli deploy
- name: Input proof test (uint64)
working-directory: test-suite/fhevm
run: |
./fhevm-cli test input-proof
- name: Public Decryption test
working-directory: test-suite/fhevm
run: |
./fhevm-cli test public-decryption
- name: User Decryption test
working-directory: test-suite/fhevm
run: |
./fhevm-cli test user-decryption
- name: ERC20 test
working-directory: test-suite/fhevm
run: |
./fhevm-cli test erc20
- name: Public Decryption HTTP endpoint test (ebool)
working-directory: test-suite/fhevm
run: |
./fhevm-cli test public-decrypt-http-ebool
- name: Public Decryption HTTP endpoint test (mixed)
working-directory: test-suite/fhevm
run: |
./fhevm-cli test public-decrypt-http-mixed
- name: Show logs on test failure
working-directory: test-suite/fhevm
if: always()
run: |
echo "::group::Relayer Logs"
./fhevm-cli logs relayer
echo "::endgroup::"
echo "::group::SNS Worker Logs"
./fhevm-cli logs sns-worker | grep -v "Selected 0 rows to process"
echo "::endgroup::"
echo "::group::Transaction Sender Logs (filtered)"
./fhevm-cli logs transaction-sender | grep -v "Selected 0 rows to process"
echo "::endgroup::"
- name: Cleanup
working-directory: test-suite/fhevm
if: always()
run: |
./fhevm-cli clean