ci: do not retry e2e + always verbose for debugging purposes #13424
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will run headful and headless E2E tests. | |
name: E2E tests | |
# Declare default permissions as read only. | |
permissions: read-all | |
env: | |
DEBUG: 'bidi:server:*,bidi:mapper:*' | |
DEBUG_DEPTH: 10 | |
FORCE_COLOR: 3 | |
PIP_DISABLE_PIP_VERSION_CHECK: 1 | |
on: | |
merge_group: | |
pull_request: | |
push: | |
branches: 'main' | |
workflow_dispatch: | |
inputs: | |
verbose: | |
description: Verbose logging | |
default: true | |
required: false | |
type: boolean | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
e2e-required: | |
name: '[Required] e2e sink' | |
needs: [e2e] | |
runs-on: ubuntu-latest | |
if: ${{ !cancelled() }} | |
steps: | |
- if: ${{ needs.e2e.result != 'success' }} | |
run: 'exit 1' | |
- run: 'exit 0' | |
e2e: | |
name: ${{ matrix.this_chunk }}/${{ matrix.total_chunks }} ${{ matrix.this_repeat }}/${{ matrix.total_repeat_tests }} ${{ matrix.kind }}-${{ matrix.os }}-${{ matrix.head }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# TODO(#876): Add Windows CI. | |
# os: [ubuntu-latest, macos-latest] | |
os: [macos-latest] | |
# head: [headful, 'new-headless', 'old-headless'] | |
head: ['new-headless'] | |
# `cd` runs e2e via `chromedriver`. `node` runs tests using `NodeJS` runner. | |
# kind: [cd, node] | |
# kind: [cd] | |
kind: [node] | |
total_chunks: [4] | |
this_chunk: [0, 1, 2, 3] | |
# `REPEAT_TESTS` in e2e does not work with snapshots, so need to repeat it manually. | |
total_repeat_tests: [40] | |
this_repeat: | |
[ | |
0, | |
1, | |
2, | |
3, | |
4, | |
5, | |
6, | |
7, | |
8, | |
9, | |
10, | |
11, | |
12, | |
13, | |
14, | |
15, | |
16, | |
17, | |
18, | |
19, | |
20, | |
21, | |
22, | |
23, | |
24, | |
25, | |
26, | |
27, | |
28, | |
29, | |
30, | |
31, | |
32, | |
33, | |
34, | |
35, | |
36, | |
37, | |
38, | |
39, | |
] | |
exclude: | |
# Run e2e via NodeJS only in new headless ubuntu. | |
- os: macos-latest | |
kind: node | |
- os: ubuntu-latest | |
kind: node | |
head: headful | |
- os: ubuntu-latest | |
kind: node | |
head: old-headless | |
# TODO(#3294): Enable headful chromedriver on ubuntu. | |
- os: ubuntu-latest | |
head: headful | |
kind: cd | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up Node.js | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version-file: '.nvmrc' | |
cache: npm | |
- name: Disable AppArmor | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md | |
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns | |
- uses: google/wireit@f21db1f3a6a4db31f42787a958cf2a18308effed # setup-github-actions-caching/v2.0.3 | |
- name: Install and build npm dependencies | |
run: npm ci | |
# Install chrome, chromedriver and headless shell is required to keep them cached. | |
- name: Install all chrome binaries if needed | |
uses: ./.github/actions/setup-chrome-binaries | |
- name: Set up Python | |
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
with: | |
python-version: '3.11' | |
cache: pipenv | |
- name: Install pipenv | |
run: pip install pipenv | |
- name: Install python dependencies | |
run: pipenv install | |
- name: Run E2E tests | |
if: matrix.os == 'ubuntu-latest' && matrix.head == 'headful' | |
timeout-minutes: 20 | |
run: > | |
xvfb-run --auto-servernum | |
npm run e2e:${{ matrix.head }} | |
-- | |
--this-chunk=${{ matrix.this_chunk }} | |
--total-chunks=${{ matrix.total_chunks }} | |
env: | |
VERBOSE: true | |
CHROMEDRIVER: ${{ matrix.kind == 'cd' }} | |
- name: Run E2E tests | |
if: matrix.os != 'ubuntu-latest' || matrix.head != 'headful' | |
timeout-minutes: 20 | |
run: > | |
npm run e2e:${{ matrix.head }} | |
-- | |
--this-chunk=${{ matrix.this_chunk }} | |
--total-chunks=${{ matrix.total_chunks }} | |
env: | |
VERBOSE: true | |
CHROMEDRIVER: ${{ matrix.kind == 'cd' }} | |
- name: Upload artifacts | |
if: ${{ !cancelled() }} | |
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 | |
with: | |
name: ${{ matrix.kind }}-${{ matrix.os }}-${{ matrix.head }}-${{ matrix.this_chunk }}-${{ matrix.this_repeat }}-artifacts | |
path: logs |