Skip to content

Commit

Permalink
ci: Update e2e test matrix to add new cases
Browse files Browse the repository at this point in the history
Signed-off-by: Mahendra Paipuri <[email protected]>
  • Loading branch information
mahendrapaipuri committed Aug 8, 2024
1 parent 4b7c4e7 commit 5659f72
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
1 change: 1 addition & 0 deletions .ci/config/tls/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ apps:

jsonData:
appUrl: https://localhost:3000
theme: dark
orientation: portrait
layout: simple
dashboardMode: full
Expand Down
12 changes: 11 additions & 1 deletion .ci/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ services:
- "GF_LOG_FILTERS=rendering:debug plugin.mahendrapaipuri-dashboardreporter-app:debug"
# Set CI mode to remove header in report
- __REPORTER_APP_CI_MODE=true
- GF_REPORTER_PLUGIN_REMOTE_CHROME_URL=${GF_REPORTER_PLUGIN_REMOTE_CHROME_URL:-}

renderer_plain:
image: grafana/grafana-image-renderer:latest
environment:
Expand Down Expand Up @@ -95,14 +97,16 @@ services:
- GF_SERVER_PROTOCOL=https
- GF_SERVER_CERT_KEY=/etc/grafana/tls/localhost.key
- GF_SERVER_CERT_FILE=/etc/grafana/tls/localhost.crt
- GF_REPORTER_PLUGIN_IGNORE_HTTPS_ERRORS=true
# Grafana image renderer
- GF_RENDERING_SERVER_URL=http://renderer_tls:8081/render
- GF_RENDERING_CALLBACK_URL=https://grafana_tls:${GF_SERVER_HTTP_PORT:-3000}/
- GF_RENDERER_PLUGIN_IGNORE_HTTPS_ERRORS=true
- GF_LOG_FILTERS=rendering:debug
# Set CI mode to remove header in report
- __REPORTER_APP_CI_MODE=true
- GF_REPORTER_PLUGIN_REMOTE_CHROME_URL=${GF_REPORTER_PLUGIN_REMOTE_CHROME_URL:-}
- GF_REPORTER_PLUGIN_SKIP_TLS_CHECK=true

renderer_tls:
image: grafana/grafana-image-renderer:latest
environment:
Expand All @@ -113,3 +117,9 @@ services:
- RENDERING_CLUSTERING_MAX_CONCURRENCY=5
- RENDERING_CLUSTERING_TIMEOUT=60
- IGNORE_HTTPS_ERRORS=true

chrome:
image: chromedp/headless-shell:latest
shm_size: 2G
init: true
network_mode: service:grafana_plain
Binary file modified .ci/reports/alternative.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion .github/workflows/step_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
--headless
--hide-scrollbars
--mute-audio
--disable-background-networking¥
--disable-background-networking
--enable-features=NetworkService,NetworkServiceInProcess
--disable-background-timer-throttling
--disable-backgrounding-occluded-windows
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/step_e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,20 @@ jobs:
fail-fast: false
matrix:
include:
# Grafana v10 with user cookie auth
- grafana-version: 10.4.3
service-accounts: 'null' # Use non empty string for env var to propagate
remote-chrome-url: ws://localhost:9222

# Grafana v10
- grafana-version: 10.4.5
service-accounts: externalServiceAccounts
remote-chrome-url: ''

# Grafana v11
- grafana-version: 11.1.0
service-accounts: externalServiceAccounts
remote-chrome-url: ws://localhost:9222

steps:
- uses: actions/checkout@v4
Expand All @@ -42,13 +52,18 @@ jobs:
install-dependencies: true

- name: Run e2e tests
env:
GRAFANA_VERSION: ${{ matrix.grafana-version }}
GF_FEATURE_TOGGLES_ENABLE: ${{ matrix.service-accounts }}
GF_REPORTER_PLUGIN_REMOTE_CHROME_URL: ${{ matrix.remote-chrome-url}}
run: |
# Upload/Download artifacts wont preserve permissions
# https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss
# Add +x bits on executables
chmod -R +x dist/gpx_*
GRAFANA_VERSION=${{ matrix.grafana-version }} yarn e2e:server:up
# Start containers
yarn e2e:server:up

# Sleep for a while for containers to be up and running
sleep 20
Expand Down

0 comments on commit 5659f72

Please sign in to comment.