Skip to content

Commit 3a33b63

Browse files
authored
fix: update performance test conditions in workflow (microsoft#1038)
# Description This pull request includes several changes to improve the configuration and workflow for the development environment and performance testing. The most important changes involve updating the Azure CLI feature reference, modifying the conditions for running performance tests, and adjusting the tagging logic for test runs. Improvements to development environment configuration: * [`.devcontainer/devcontainer.json`](diffhunk://#diff-24ad71c8613ddcf6fd23818cb3bb477a1fb6d83af4550b0bad43099813088686L11-R11): Updated the Azure CLI feature reference from `ghcr.io/devcontainers-contrib/features/azure-cli:1` to `ghcr.io/devcontainers/features/azure-cli:1`. Enhancements to performance testing workflow: * [`.github/workflows/perf.yaml`](diffhunk://#diff-1aa140a875fcb7cae6b4ada7e6e973c4d55179ad046f56465f9f0ec592f283caL23-R23): Modified the condition for running the `perf_test` job to exclude events triggered by `workflow_run` unless the event name is `merge_group`. * [`.github/workflows/perf.yaml`](diffhunk://#diff-1aa140a875fcb7cae6b4ada7e6e973c4d55179ad046f56465f9f0ec592f283caL52-R57): Adjusted the logic for setting the `TAG` variable to use `make version` for `merge_group` events and to handle `workflow_dispatch` events correctly. ## Checklist - [X] I have read the [contributing documentation](https://retina.sh/docs/contributing). - [X] I signed and signed-off the commits (`git commit -S -s ...`). See [this documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) on signing commits. - [X] I have correctly attributed the author(s) of the code. - [X] I have tested the changes locally. - [X] I have followed the project's style guidelines. - [X] I have updated the documentation, if necessary. - [X] I have added tests, if applicable. --- Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more information on how to contribute to this project.
1 parent 4d00d2e commit 3a33b63

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/perf.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ permissions:
2020

2121
jobs:
2222
perf_test:
23-
if: ${{ github.event_name == 'merge_group' }}
23+
if: ${{ github.event != 'workflow_run' || github.event_name == 'merge_group' }}
2424
name: Retina Performance Test
2525
runs-on: ubuntu-latest
2626

@@ -49,11 +49,11 @@ jobs:
4949
shell: bash
5050
run: |
5151
set -euo pipefail
52-
if [ -n "${{ github.event.inputs.tag }}" ]; then
52+
if [ "${{ github.event }}" == "workflow_dispatch" ]; then
5353
TAG=${{ github.event.inputs.tag }}
5454
elif [ "${{ github.event_name }}" == "merge_group" ]; then
55-
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
55+
TAG=$(make version)
5656
else
57-
TAG="default-version"
57+
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
5858
fi
5959
go test -v ./test/e2e/. -timeout 2h -tags=perf -count=1 -args -image-tag=$TAG -image-registry=${{ vars.ACR_NAME }} -image-namespace=${{ github.repository }}

0 commit comments

Comments
 (0)