diff --git a/.github/workflows/images.yaml b/.github/workflows/images.yaml index abd24a2b50..9c4974cb1a 100644 --- a/.github/workflows/images.yaml +++ b/.github/workflows/images.yaml @@ -331,3 +331,36 @@ jobs: run: | set -euo pipefail go test -v ./test/e2e/. -timeout 60m -tags=e2e -count=1 -args -image-tag=$(make version) -image-registry=${{ vars.ACR_NAME }} -image-namespace=${{ github.repository}} + + perf: + if: ${{ github.event_name == 'merge_group' && success('manifests')}} + name: Retina Performance Test + runs-on: ubuntu-latest + needs: [manifests] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + - run: go version + + - name: Az CLI login + uses: azure/login@v2 + if: ${{ github.event_name == 'merge_group' }} + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION }} + + - name: Run E2E Tests + env: + AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION }} + AZURE_LOCATION: ${{ vars.AZURE_LOCATION }} + shell: bash + run: | + set -euo pipefail + go test -v ./test/e2e/. -timeout 2h -tags=perf -count=1 -args -image-tag=$(make version) -image-registry=${{ vars.ACR_NAME }} -image-namespace=${{ github.repository }} diff --git a/.github/workflows/perf.yaml b/.github/workflows/perf.yaml index bf5b7b67c3..dcbe96f7bf 100644 --- a/.github/workflows/perf.yaml +++ b/.github/workflows/perf.yaml @@ -1,10 +1,6 @@ name: Network Performance Measurement on: - workflow_run: - workflows: [Build Images] - types: - - completed schedule: # It runs on 17th minute of every 12 hours - cron: '17 */12 * * *' @@ -20,7 +16,6 @@ permissions: jobs: perf_test: - if: ${{ github.event_name != 'workflow_run' || github.event_name == 'merge_group' }} name: Retina Performance Test runs-on: ubuntu-latest @@ -51,9 +46,7 @@ jobs: set -euo pipefail if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then TAG=${{ github.event.inputs.tag }} - elif [ "${{ github.event_name }}" == "merge_group" ]; then - TAG=$(make version) else TAG=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name) fi - go test -v ./test/e2e/. -timeout 2h -tags=perf -count=1 -args -image-tag=$TAG -image-registry=${{ vars.ACR_NAME }} -image-namespace=${{ github.repository }} + go test -v ./test/e2e/. -timeout 2h -tags=perf -count=1 -args -image-tag=$TAG -image-registry=ghcr.io -image-namespace=${{ github.repository }}