Skip to content

ci(common): fix name and make string values uniform #750

ci(common): fix name and make string values uniform

ci(common): fix name and make string values uniform #750

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:
name: test-suite-e2e-tests/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
with:
persist-credentials: 'false'
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: filter
with:
filters: |
fhevm:
- 'test-suite/fhevm/**'
fhevm-e2e-test:
name: test-suite-e2e-tests/fhevm-e2e-test (bpr)
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
with:
persist-credentials: 'false'
- 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