github.com/oam-dev/kubevela@v1.9.11/.github/workflows/e2e-test.yml (about)

     1  name: E2E Test
     2  
     3  on:
     4    push:
     5      branches:
     6        - master
     7        - release-*
     8      tags:
     9        - v*
    10    workflow_dispatch: {}
    11    pull_request:
    12      branches:
    13        - master
    14        - release-*
    15  
    16  permissions:
    17    contents: read
    18  
    19  env:
    20    # Common versions
    21    GO_VERSION: '1.19'
    22  
    23  jobs:
    24  
    25    detect-noop:
    26      permissions:
    27        actions: write
    28      runs-on: ubuntu-22.04
    29      outputs:
    30        noop: ${{ steps.noop.outputs.should_skip }}
    31      steps:
    32        - name: Detect No-op Changes
    33          id: noop
    34          uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf
    35          with:
    36            github_token: ${{ secrets.GITHUB_TOKEN }}
    37            paths_ignore: '["**.md", "**.mdx", "**.png", "**.jpg"]'
    38            do_not_skip: '["workflow_dispatch", "schedule", "push"]'
    39          continue-on-error: true
    40  
    41    e2e-tests:
    42      runs-on: self-hosted
    43      needs: [ detect-noop ]
    44      if: needs.detect-noop.outputs.noop != 'true'
    45      strategy:
    46        matrix:
    47          k8s-version: ["v1.26"]
    48      concurrency:
    49        group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.k8s-version }}
    50        cancel-in-progress: true
    51  
    52      steps:
    53        - name: Check out code into the Go module directory
    54          uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
    55  
    56        - name: Install tools
    57          run: |
    58            sudo apt-get update
    59            sudo apt-get install make gcc jq ca-certificates curl gnupg -y
    60            sudo snap install kubectl --classic
    61            sudo snap install helm --classic
    62  
    63        - name: Setup Go
    64          uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
    65          with:
    66            go-version: ${{ env.GO_VERSION }}
    67  
    68        - name: Get dependencies
    69          run: |
    70            go get -v -t -d ./...
    71  
    72        - name: Setup KinD
    73          run: |
    74            go install sigs.k8s.io/kind@v0.19.0
    75            kind delete cluster || true
    76            kind create cluster
    77  
    78        - name: Get Ginkgo
    79          run: |
    80            go install github.com/onsi/ginkgo/v2/ginkgo@v2.10.0
    81            go get github.com/onsi/gomega/...
    82  
    83        - name: Load image
    84          run: |
    85            mkdir -p $HOME/tmp/
    86            TMPDIR=$HOME/tmp/ make image-load
    87  
    88        - name: Run Make
    89          run: make
    90  
    91        - name: Prepare for e2e tests
    92          run: |
    93            make e2e-cleanup
    94            make e2e-setup-core
    95            helm test -n vela-system kubevela --timeout 5m
    96  
    97        - name: Run api e2e tests
    98          run: make e2e-api-test
    99  
   100        - name: Run addons e2e tests
   101          run: make e2e-addon-test
   102  
   103        - name: Run e2e tests
   104          run: make e2e-test
   105  
   106        - name: Stop kubevela, get profile
   107          run: make end-e2e
   108  
   109        - name: Upload coverage report
   110          uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d
   111          with:
   112            token: ${{ secrets.CODECOV_TOKEN }}
   113            files: /tmp/e2e-profile.out
   114            flags: e2etests
   115            name: codecov-umbrella
   116  
   117        - name: Clean e2e profile
   118          run: rm /tmp/e2e-profile.out
   119  
   120        - name: Cleanup image
   121          if: ${{ always() }}
   122          run: |
   123            make image-cleanup
   124            docker image prune -f --filter "until=24h"