|
6 | 6 | ref: |
7 | 7 | required: true |
8 | 8 | type: string |
9 | | -permissions: write-all |
| 9 | + type: |
| 10 | + description: 'E2E type' |
| 11 | + type: string |
| 12 | + default: pullrequest |
10 | 13 |
|
11 | 14 | jobs: |
12 | | - upgrade-e2e: |
13 | | - runs-on: ubuntu-latest |
| 15 | + e2e-upgrade-test: |
| 16 | + strategy: |
| 17 | + matrix: |
| 18 | + include: |
| 19 | + - device: nvidia |
| 20 | + type: tesla-p4 |
| 21 | + # - device: nvidia |
| 22 | + # type: rtx-4090 |
| 23 | + # - device: huawei |
| 24 | + # type: ascend-910b |
| 25 | + runs-on: [ "${{ matrix.device }}", "${{ matrix.type }}" ] |
| 26 | + environment: ${{ matrix.device }} |
| 27 | + env: |
| 28 | + HAMI_VERSION: ${{ inputs.ref }} |
| 29 | + E2E_TYPE: ${{ inputs.type }} |
14 | 30 | steps: |
15 | | - - name: e2e upgrade test |
16 | | - # https://github.com/actions/virtual-environments/issues/709 |
| 31 | + - name: checkout code |
| 32 | + uses: actions/checkout@v4 |
| 33 | + |
| 34 | + - name: install Go |
| 35 | + uses: actions/setup-go@v5 |
| 36 | + with: |
| 37 | + go-version: "1.21" |
| 38 | + |
| 39 | + - name: setup e2e env |
| 40 | + run: | |
| 41 | + make e2e-env-setup |
| 42 | +
|
| 43 | + - name: download hami helm |
| 44 | + if: inputs.type == 'pullrequest' |
| 45 | + uses: actions/download-artifact@v4 |
| 46 | + with: |
| 47 | + name: chart_package_artifact |
| 48 | + path: charts/ |
| 49 | + |
| 50 | + - name: download hami image |
| 51 | + if: inputs.type == 'pullrequest' |
| 52 | + uses: actions/download-artifact@v4 |
| 53 | + with: |
| 54 | + name: hami-image |
| 55 | + path: ./image |
| 56 | + |
| 57 | + - name: load e2e image |
| 58 | + if: inputs.type == 'pullrequest' |
| 59 | + run: | |
| 60 | + echo "Loading Docker image from image.tar..." |
| 61 | + if [ -z "${VSPHERE_GPU_VM_IP}" ]; then |
| 62 | + echo "Error: VSPHERE_GPU_VM_IP is not defined!" |
| 63 | + exit 1 |
| 64 | + fi |
| 65 | + scp ./image/image.tar root@$VSPHERE_GPU_VM_IP:/home/ |
| 66 | + ssh root@$VSPHERE_GPU_VM_IP "nerdctl load -i /home/image.tar" |
| 67 | + ssh root@$VSPHERE_GPU_VM_IP "nerdctl image ls | grep hami" |
| 68 | +
|
| 69 | + - name: deploy previous release hami helm |
| 70 | + run: | |
| 71 | + HAMI_VERSION=$(git tag -l --sort=-v:refname | grep -v ${{ env.HAMI_VERSION }} | head -n3 ) |
| 72 | + E2E_TYPE="upgrade" |
| 73 | + echo "Previous release tag is: ${HAMI_VERSION}" |
| 74 | + make helm-deploy |
| 75 | +
|
| 76 | + - name: deploy release hami helm |
| 77 | + run: | |
| 78 | + make helm-deploy |
| 79 | +
|
| 80 | + - name: e2e test |
17 | 81 | run: | |
18 | | - echo "Need to add e2e upgrade test" |
| 82 | + make e2e-test |
0 commit comments