Skip to content
Closed
Show file tree
Hide file tree
Changes from 20 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions .github/actions/run-end-to-end-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@ name: Run End-to-End tests
description: Execute tests
inputs:
tests:
default: ''
default: ""
github_ref:
default: 'main'
default: "main"
required: false
accessibility_tests:
default: 'false'
default: "false"
reporting_tests:
default: 'false'
default: "false"
imms_api_tests:
default: 'false'
default: "false"
pds_api_tests:
default: 'false'
default: "false"
device:
required: true
base_url:
required: true
programmes_enabled:
default: 'FLU,HPV,MENACWY,MMR,TD_IPV'
default: "FLU,HPV,MENACWY,MMR,TD_IPV"
screenshot_all_steps:
required: true
enable_reruns:
default: 'true'
default: "true"
test_workers:
default: '4'
default: "4"
set_feature_flags:
default: 'false'
default: "false"
additional_feature_flags:
default: ''
default: ""
playwright_cache_hit:
required: true

Expand All @@ -44,11 +44,13 @@ runs:
run: uv run playwright install
shell: bash

- name: Install Playwright dependencies if using webkit
if: >-
inputs.device == 'Desktop Safari' ||
inputs.device == 'iPad (gen 7) landscape' ||
inputs.device == 'iPhone 15'
- name: Install Playwright dependencies if using webkit on Linux
if: |
inputs.playwright_cache_hit != 'true' &&
runner.os == 'Linux' &&
(inputs.device == 'Desktop Safari' ||
inputs.device == 'iPad (gen 7) landscape' ||
inputs.device == 'iPhone 15')
run: uv run playwright install-deps webkit
shell: bash

Expand Down
61 changes: 44 additions & 17 deletions .github/workflows/end-to-end-tests-all-devices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,40 @@ jobs:
contents: write
id-token: write

name: End-to-End tests
name: ${{ matrix.device }}
strategy:
fail-fast: false
matrix:
device:
- Desktop Chrome
- Desktop Edge
- Desktop Firefox
- Desktop Safari
- Galaxy S9+
- Pixel 7
- iPad (gen 7) landscape
- iPhone 15
max-parallel: 2
include:
# Linux devices
- device: Desktop Chrome
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
- device: Desktop Edge
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
- device: Desktop Firefox
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
- device: Galaxy S9+
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
- device: Pixel 7
os: ubuntu-latest
cache_path: ~/.cache/ms-playwright
# macOS devices
- device: Desktop Safari
os: macos-latest
cache_path: ~/Library/Caches/ms-playwright
- device: iPad (gen 7) landscape
os: macos-latest
cache_path: ~/Library/Caches/ms-playwright
- device: iPhone 15
os: macos-latest
cache_path: ~/Library/Caches/ms-playwright
max-parallel: 5
Copy link
Copy Markdown
Contributor

@zoltan-antal zoltan-antal Mar 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can see that you changed it to 2 in order to

avoid teams getting deleted

But now it's back up to 5 again. If this can truly cause flakiness, should we not just turn it down to 1? It seems that the workflow doesn't take that long, and it mainly runs as night, so it should probably be fine?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am seeing a strange 500 response on the reset_team function. This is only happening on GH, not on local. I have tried various solutions on different commits, but the issue persists. Even 1 parallel run does not help.


runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
env:
TZ: "Europe/London"

Expand All @@ -38,23 +56,32 @@ jobs:
with:
environment_url: ${{ vars.BASE_URL }}

- name: Set cache path
id: cache-path
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
echo "path=$HOME/Library/Caches/ms-playwright" >> "$GITHUB_OUTPUT"
else
echo "path=$HOME/.cache/ms-playwright" >> "$GITHUB_OUTPUT"
fi

- name: Cache Playwright browsers
uses: actions/cache@v5
id: playwright-cache
with:
path: /home/runner/.cache/ms-playwright
path: ${{ steps.cache-path.outputs.path }}
key: playwright-${{ runner.os }}-${{ hashFiles('**/pyproject.toml') }}

- name: Run tests
uses: ./.github/actions/run-end-to-end-tests
with:
device: ${{ matrix.device }}
base_url: ${{ vars.BASE_URL }}
imms_api_tests: 'true'
pds_api_tests: 'true'
reporting_tests: 'true'
imms_api_tests: "false"
pds_api_tests: "false"
reporting_tests: "false"
Comment on lines +80 to +82
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, why are we turning these off?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am seeing a strange 500 response on the reset_team function. This is only happening on GH, not on local. I have tried various solutions on different commits, but the issue persists. Even 1 parallel run does not help.

playwright_cache_hit: ${{ steps.playwright-cache.outputs.cache-hit }}
screenshot_all_steps: 'false'
screenshot_all_steps: "false"
env:
BASIC_AUTH_TOKEN: ${{ secrets.HTTP_AUTH_TOKEN_FOR_TESTS }}
IMMS_BASE_URL: ${{ vars.IMMS_BASE_URL }}
Expand Down
Loading
Loading