Skip to content

Commit 7cf1e98

Browse files
committed
1 parent c51e782 commit 7cf1e98

File tree

4 files changed

+75
-40
lines changed

4 files changed

+75
-40
lines changed
Lines changed: 24 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,27 @@
11
name: "Test: UI E2E JS"
22

33
on:
4-
schedule:
5-
- cron: "20 04 * * *"
6-
push:
7-
branches:
8-
- master
9-
pull_request:
10-
branches:
11-
- master
12-
workflow_call:
134
workflow_dispatch:
5+
workflow_call:
6+
inputs:
7+
os:
8+
description: "Operating system"
9+
type: string
10+
required: true
11+
default: "ubuntu-latest"
1412

1513
env:
16-
TESTS_LOG_LEVEL: debug
17-
# xvfb is slow to start
18-
NODE_TEST_TIMEOUT: 90000
19-
TRACE: 1
14+
TRACE: 1 # justfile set -x
15+
TESTS_LOG_LEVEL: debug # tests-e2e-js
16+
NODE_TEST_TIMEOUT: 90000 # xvfb is slow to start
2017

2118
jobs:
2219

2320
test:
24-
strategy:
25-
fail-fast: false
26-
matrix:
27-
include:
28-
- platform: 'macos-latest' # for Arm based macs (M1 and above).
29-
args: '--target aarch64-apple-darwin'
30-
- platform: 'macos-latest' # for Intel based macs.
31-
args: '--target x86_64-apple-darwin'
32-
- platform: 'ubuntu-latest'
33-
args: ''
34-
- platform: 'windows-latest'
35-
args: ''
3621

37-
timeout-minutes: 15
38-
runs-on: ${{ matrix.platform }}
3922
name: "Run UI E2E tests"
23+
timeout-minutes: 15
24+
runs-on: ${{ inputs.os }}
4025
steps:
4126
- name: Checkout
4227
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
@@ -58,34 +43,33 @@ jobs:
5843
toolchain: stable
5944
override: true
6045

61-
62-
# https://github.com/Swatinem/rust-cache/issues/169
6346
- name: Setup Rust Cache
6447
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
48+
# https://github.com/Swatinem/rust-cache/issues/169
49+
if: ${{ inputs.os != 'windows-latest' }}
6550
with:
6651
cache-all-crates: true
6752
cache-targets: true
6853
cache-directories: |
6954
.build
7055
7156
- name: Install Prerequisites
72-
if: matrix.platform == 'ubuntu-latest'
57+
if: ${{ input.os == 'ubuntu-latest' }}
58+
shell: "bash"
7359
run: |
7460
. <(just prerequisites)
7561
76-
- name: Run UI E2E tests Linux
77-
if: matrix.platform == 'ubuntu-latest'
62+
- name: Linux - Run UI E2E tests
63+
if: ${{ inputs.os == 'ubuntu-latest' }}
64+
shell: "bash"
7865
run: xvfb-run -a just test-e2e
7966

80-
- name: Run UI E2E tests Windows
67+
- name: Windows - Run UI E2E tests
68+
if: ${{ inputs.os == 'windows-latest' }}
8169
shell: "bash"
82-
if: matrix.platform == 'windows-latest'
8370
run: just test-e2e
8471

85-
- name: Run UI E2E tests MacOS
86-
if: matrix.args == '--target aarch64-apple-darwin'
87-
run: just test-e2e
88-
89-
- name: Run UI E2E tests MacOS
90-
if: matrix.args == '--target x86_64-apple-darwin'
72+
- name: MacOS - Run UI E2E tests
73+
if: ${{ inputs.os == 'macos-latest' }}
74+
shell: "bash"
9175
run: just test-e2e

.github/workflows/tests-linux.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Linux Tests"
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "20 04 * * *"
8+
push:
9+
branches:
10+
- master
11+
jobs:
12+
13+
linux-e2e:
14+
name: "Run e2e tests"
15+
uses: ./.github/workflows/main.yaml
16+
with:
17+
os: ubuntu-latest

.github/workflows/tests-macos.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "macOS Tests"
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "20 04 * * *"
8+
push:
9+
branches:
10+
- master
11+
jobs:
12+
13+
macos-e2e:
14+
name: "Run e2e tests"
15+
uses: ./.github/workflows/main.yaml
16+
with:
17+
os: macos-latest

.github/workflows/tests-windows.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Windows Tests"
2+
3+
on:
4+
workflow_call:
5+
workflow_dispatch:
6+
schedule:
7+
- cron: "20 04 * * *"
8+
push:
9+
branches:
10+
- master
11+
jobs:
12+
13+
windows-e2e:
14+
name: "Run e2e tests"
15+
uses: ./.github/workflows/main.yaml
16+
with:
17+
os: windows-latest

0 commit comments

Comments
 (0)