Skip to content

fix golang ci lint version #3964

fix golang ci lint version

fix golang ci lint version #3964

Workflow file for this run

name: E2E Apply Test
on:
workflow_dispatch:
pull_request_target:
types: [ labeled ]
jobs:
call_ci_workflow:
uses: ./.github/workflows/import-patch-image.yml
if: ${{ github.event.action == 'labeled' && github.event.label.name == 'need-e2e-apply-test' }}
with:
arch: amd64,arm64
e2e: true
image: true
target_pull: true
e2e_apply_test:
needs: [ call_ci_workflow ]
runs-on: ubuntu-latest
permissions:
issues: write
strategy:
fail-fast: false
matrix:
arch: [ arm64, amd64 ]
outputs:
test_arm64_result: ${{ steps.apply_test.outputs.test_arm64_result }}
test_amd64_result: ${{ steps.apply_test.outputs.test_amd64_result }}
steps:
- name: Download sealos binary
uses: actions/download-artifact@v3
with:
name: sealos-${{ matrix.arch }}
path: /tmp/sealos/bin/
- name: Download sealos
uses: actions/download-artifact@v3
with:
name: sealos-amd64
path: /tmp/verify/
- name: Verify sealos
run: |
sudo chmod a+x /tmp/verify/sealos
sudo /tmp/verify/sealos version
- name: Download patch image tar
uses: actions/download-artifact@v3
with:
name: patch-image-${{ matrix.arch }}.tar
path: /tmp/sealos/images/
- name: Download e2e test
uses: actions/download-artifact@v3
with:
name: e2e.test
path: /tmp/
- name: Install ginkgo && Run e2e apply test
id: apply_test
shell: bash
env:
SEALOS_E2E_TEST_IMAGE_NAME: registry.cn-shanghai.aliyuncs.com/labring/kubernetes:v1.25.6
SEALOS_E2E_TEST_PATCH_IMAGE_TAR: /tmp/sealos/images/patch-${{ matrix.arch }}.tar.gz
SEALOS_E2E_TEST_PATCH_IMAGE_NAME: ghcr.io/labring/sealos-patch:${{ env.GIT_COMMIT_SHORT_SHA }}-${{ matrix.arch }}
SEALOS_E2E_TEST_SEALOS_BIN_PATH: /tmp/sealos/bin/sealos
ALIYUN_ACCESS_KEY_ID: ${{ secrets.E2E_ALIYUN_ACCESS_KEY_ID }}
ALIYUN_ACCESS_KEY_SECRET: ${{ secrets.E2E_ALIYUN_ACCESS_KEY_SECRET }}
ALIYUN_RESOURCE_GROUP_ID: ${{ secrets.E2E_ALIYUN_RESOURCE_GROUP_ID }}
ALIYUN_REGION_ID: ${{ secrets.E2E_ALIYUN_REGION_ID }}
run: |
set -ex
sudo su
chmod a+x /tmp/e2e.test
gzip /tmp/sealos/images/patch-${{ matrix.arch }}.tar
/tmp/e2e.test --ginkgo.v --ginkgo.focus="E2E_sealos_apply_infra_test"
echo 'test_${{ matrix.arch }}_result=success' >> "$GITHUB_OUTPUT"
issue_commit:
needs: [ e2e_apply_test ]
runs-on: ubuntu-latest
permissions:
issues: write
if: ${{ always() && github.event.label.name == 'need-e2e-apply-test' }} #success() || failure()
steps:
- name: Add comment to PR with test status
uses: peter-evans/create-or-update-comment@v1
env:
ARM_TEST_RESULT: ${{ needs.e2e_apply_test.outputs.test_arm64_result == 'success' && 'Success 🎉🎉!' || '‼️ Failure' }}
AMD_TEST_RESULT: ${{ needs.e2e_apply_test.outputs.test_amd64_result == 'success' && 'Success 🎉🎉!' || '‼️ Failure' }}
with:
issue-number: ${{ github.event.number }}
comment-author: 'github-actions[bot]'
repository: ${{ github.repository }}
body: |
🤖 says: E2E ARM64 Apply Test Result: ${{ env.ARM_TEST_RESULT }} , E2E AMD64 Apply Test Result: ${{ env.AMD_TEST_RESULT }}<br/>See: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
token: "${{ secrets.GH_PAT }}"