Skip to content

Commit

Permalink
feat: add advanced retina performance test workflows (#1264)
Browse files Browse the repository at this point in the history
# Description

This pull request includes changes to the GitHub Actions workflows to
add a new advanced performance test and rename the existing performance
test to basic performance test. The changes affect both the
`.github/workflows/images.yaml` and `.github/workflows/perf.yaml` files.

The most important changes include:

### Workflow updates:

*
[`.github/workflows/images.yaml`](diffhunk://#diff-d0a3d6684c78a148cbf0725d5fe8b5aab6431da05b698a82c9e015516f3020baL335-R337):
Renamed the `perf` job to `perf-basic` and updated the test command to
include `-retina-mode=basic` argument.
[[1]](diffhunk://#diff-d0a3d6684c78a148cbf0725d5fe8b5aab6431da05b698a82c9e015516f3020baL335-R337)
[[2]](diffhunk://#diff-d0a3d6684c78a148cbf0725d5fe8b5aab6431da05b698a82c9e015516f3020baL367-R401)
*
[`.github/workflows/images.yaml`](diffhunk://#diff-d0a3d6684c78a148cbf0725d5fe8b5aab6431da05b698a82c9e015516f3020baL367-R401):
Added a new job `perf-advanced` for running the advanced performance
tests with `-retina-mode=advanced` argument.

*
[`.github/workflows/perf.yaml`](diffhunk://#diff-1aa140a875fcb7cae6b4ada7e6e973c4d55179ad046f56465f9f0ec592f283caL18-R19):
Renamed the `perf_test` job to `perf_test-basic` and updated the test
command to include `-retina-mode=basic` argument.
[[1]](diffhunk://#diff-1aa140a875fcb7cae6b4ada7e6e973c4d55179ad046f56465f9f0ec592f283caL18-R19)
[[2]](diffhunk://#diff-1aa140a875fcb7cae6b4ada7e6e973c4d55179ad046f56465f9f0ec592f283caL52-R88)
*
[`.github/workflows/perf.yaml`](diffhunk://#diff-1aa140a875fcb7cae6b4ada7e6e973c4d55179ad046f56465f9f0ec592f283caL52-R88):
Added a new job `perf_test-advanced` for running the advanced
performance tests with `-retina-mode=advanced` argument.

## Related Issue

If this pull request is related to any issue, please mention it here.
Additionally, make sure that the issue is assigned to you before
submitting this pull request.

## Checklist

- [ ] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [ ] 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.
- [ ] I have correctly attributed the author(s) of the code.
- [ ] I have tested the changes locally.
- [ ] I have followed the project's style guidelines.
- [ ] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.
  • Loading branch information
ritwikranjan authored Jan 30, 2025
1 parent 55f2a4a commit 20d1efd
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 8 deletions.
42 changes: 38 additions & 4 deletions .github/workflows/images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,9 @@ jobs:
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:
perf-basic:
if: ${{ github.event_name == 'merge_group' && success('manifests')}}
name: Retina Performance Test
name: Retina Basic Performance Test
runs-on: ubuntu-latest
needs: [manifests]

Expand All @@ -345,7 +345,41 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: 1.23
- 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 Perf Tests
env:
AZURE_APP_INSIGHTS_KEY: ${{ secrets.AZURE_APP_INSIGHTS_KEY }}
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 }} -retina-mode=basic
perf-advanced:
if: ${{ github.event_name == 'merge_group' && success('manifests')}}
name: Retina Advanced 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: 1.23
- run: go version

- name: Az CLI login
Expand All @@ -364,4 +398,4 @@ jobs:
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 }}
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 }} -retina-mode=advanced
44 changes: 40 additions & 4 deletions .github/workflows/perf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ permissions:
id-token: write

jobs:
perf_test:
name: Retina Performance Test
perf-test-basic:
name: Retina Basic Performance Test
runs-on: ubuntu-latest

steps:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
go-version: 1.23
- run: go version

- name: Az CLI login
Expand All @@ -49,4 +49,40 @@ jobs:
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=ghcr.io -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 }} -retina-mode=basic
perf-test-advanced:
name: Retina Advanced Performance Test
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup go
uses: actions/setup-go@v5
with:
go-version: 1.23
- run: go version

- name: Az CLI login
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION }}

- name: Run performance measurement for Retina
env:
AZURE_APP_INSIGHTS_KEY: ${{ secrets.AZURE_APP_INSIGHTS_KEY }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION }}
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
shell: bash
run: |
set -euo pipefail
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
TAG=${{ github.event.inputs.tag }}
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=ghcr.io -image-namespace=${{ github.repository }} -retina-mode=advanced

0 comments on commit 20d1efd

Please sign in to comment.