Skip to content

Commit b190382

Browse files
authored
[ci] Tests run on Linux arm64 hosted runners (#2592)
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
1 parent eaa1ee5 commit b190382

File tree

6 files changed

+166
-45
lines changed

6 files changed

+166
-45
lines changed

.circleci/config.yml renamed to .circleci/config.bak

+13-13
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@ version: 2.1
33
workflows:
44
build-and-test-multi-arch:
55
jobs:
6-
- kubernetes-test:
7-
name: "K8s test - Playwright Connect Autoscaling Grid"
8-
platforms: linux/arm64
9-
machine-type: ubuntu2204arm64large
10-
k8s-version: 'v1.25.16'
11-
test-strategy: playwright_connect_grid
12-
cluster: 'minikube'
13-
helm-version: 'v3.11.3'
14-
docker-version: '24.0.9'
15-
test-upgrade: true
166
- kubernetes-test:
177
name: "K8s test - Autoscaling disabled"
188
platforms: linux/arm64
@@ -47,7 +37,7 @@ workflows:
4737
name: "K8s test - Autoscaling Jobs - HTTPS"
4838
platforms: linux/arm64
4939
machine-type: ubuntu2204arm64large
50-
k8s-version: 'v1.29.12'
40+
k8s-version: 'v1.29.13'
5141
test-strategy: job_https
5242
cluster: 'minikube'
5343
helm-version: 'v3.14.3'
@@ -57,7 +47,7 @@ workflows:
5747
name: "K8s test - Autoscaling Jobs - Ingress hostname"
5848
platforms: linux/arm64
5949
machine-type: ubuntu2204arm64large
60-
k8s-version: 'v1.30.8'
50+
k8s-version: 'v1.30.9'
6151
test-strategy: job_hostname
6252
cluster: 'minikube'
6353
helm-version: 'v3.15.4'
@@ -67,12 +57,22 @@ workflows:
6757
name: "K8s test - Autoscaling Deployments - HTTPS"
6858
platforms: linux/arm64
6959
machine-type: ubuntu2204arm64large
70-
k8s-version: 'v1.31.4'
60+
k8s-version: 'v1.31.5'
7161
test-strategy: deployment_https
7262
cluster: 'minikube'
7363
helm-version: 'v3.16.4'
7464
docker-version: '27.4.1'
7565
test-upgrade: true
66+
- kubernetes-test:
67+
name: "K8s test - Playwright Connect Autoscaling Grid"
68+
platforms: linux/arm64
69+
machine-type: ubuntu2204arm64large
70+
k8s-version: 'v1.32.1'
71+
test-strategy: playwright_connect_grid
72+
cluster: 'minikube'
73+
helm-version: 'v3.17.0'
74+
docker-version: '26.1.4'
75+
test-upgrade: true
7676
- docker-test:
7777
name: "Docker test - Use random user (true)"
7878
test-strategy: test

.github/actions/get-latest-upstream/action.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ runs:
1818
shell: bash
1919
run: |
2020
sudo apt update
21-
sudo apt install gh
22-
echo "${{ inputs.gh_cli_token }}" | gh auth login --with-token
21+
sudo apt install jq
22+
AUTH_HEADER="Authorization: token ${{ inputs.gh_cli_token }}"
2323
if [ "${{ inputs.release }}" = "true" ]; then
2424
echo "Getting the latest stable release."
25-
RELEASE=$(gh release list -R SeleniumHQ/selenium | grep -v nightly | awk '{ print $4 }' | head -1)
25+
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq -r '[.[] | select(.prerelease == false)] | .[0].tag_name')
2626
else
2727
echo "Getting the latest Nightly release."
28-
RELEASE=$(gh release list -R SeleniumHQ/selenium | grep nightly | awk '{ print $3 }' | head -1)
28+
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq -r '[.[] | select(.prerelease == true)] | .[0].tag_name')
2929
if [ -z "${RELEASE}" ]; then
3030
echo "Nightly release not found, getting the latest stable release."
31-
RELEASE=$(gh release list -R SeleniumHQ/selenium | grep -v nightly | awk '{ print $4 }' | head -1)
31+
RELEASE=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases | jq -r '[.[] | select(.prerelease == false)] | .[0].tag_name')
3232
fi
3333
fi
34-
jar_file=$(gh release view -R SeleniumHQ/selenium ${RELEASE} | grep jar | awk '{ print $2 }' | tail -n 1)
34+
jar_file=$(curl -s -H "$AUTH_HEADER" https://api.github.com/repos/SeleniumHQ/selenium/releases/tags/${RELEASE} | jq -r '.assets[] | select(.name | endswith(".jar")) | .name' | tail -n 1)
3535
echo "Server package: ${jar_file}"
3636
VERSION=$(echo $jar_file | sed 's/selenium-server-//;s/\.jar//')
3737
echo "BASE_RELEASE=${RELEASE} | BASE_VERSION=${VERSION} | VERSION=${VERSION}"

.github/workflows/docker-test.yml

+118-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ permissions:
2929
jobs:
3030
build-and-test:
3131
name: Test Docker Selenium
32-
runs-on: ubuntu-24.04
32+
runs-on: ${{ matrix.os }}
3333
strategy:
3434
fail-fast: false
3535
matrix:
@@ -38,38 +38,129 @@ jobs:
3838
use-random-user: true
3939
test-video: false
4040
build-all: true
41+
os: ubuntu-24.04
42+
firefox-install-lang-package:
43+
enable-managed-downloads:
4144
- test-strategy: test
4245
use-random-user: false
4346
test-video: false
4447
build-all: true
48+
os: ubuntu-24.04
49+
firefox-install-lang-package:
50+
enable-managed-downloads:
4551
- test-strategy: test_video
4652
use-random-user: false
4753
test-video: true
4854
build-all: false
55+
os: ubuntu-24.04
56+
firefox-install-lang-package:
57+
enable-managed-downloads:
4958
- test-strategy: test_video_dynamic_name
5059
use-random-user: false
5160
test-video: true
5261
build-all: false
62+
os: ubuntu-24.04
63+
firefox-install-lang-package:
64+
enable-managed-downloads:
5365
- test-strategy: test_video_standalone
5466
use-random-user: false
5567
test-video: true
5668
build-all: false
69+
os: ubuntu-24.04
70+
firefox-install-lang-package:
71+
enable-managed-downloads:
5772
- test-strategy: test_node_docker
5873
use-random-user: false
5974
test-video: true
6075
build-all: false
76+
os: ubuntu-24.04
77+
firefox-install-lang-package:
78+
enable-managed-downloads:
6179
- test-strategy: test_standalone_docker
6280
use-random-user: false
6381
test-video: true
6482
build-all: false
83+
os: ubuntu-24.04
84+
firefox-install-lang-package:
85+
enable-managed-downloads:
6586
- test-strategy: test_parallel
6687
use-random-user: false
6788
test-video: false
6889
build-all: false
90+
os: ubuntu-24.04
91+
firefox-install-lang-package:
92+
enable-managed-downloads:
6993
- test-strategy: test_node_relay
7094
use-random-user: false
7195
test-video: false
7296
build-all: false
97+
os: ubuntu-24.04
98+
firefox-install-lang-package:
99+
enable-managed-downloads:
100+
###
101+
- test-strategy: test
102+
use-random-user: true
103+
test-video: false
104+
build-all: true
105+
os: ubuntu-24.04-arm
106+
firefox-install-lang-package: false
107+
enable-managed-downloads: false
108+
- test-strategy: test
109+
use-random-user: false
110+
test-video: false
111+
build-all: true
112+
os: ubuntu-24.04-arm
113+
firefox-install-lang-package: false
114+
enable-managed-downloads: false
115+
- test-strategy: test_video
116+
use-random-user: false
117+
test-video: true
118+
build-all: false
119+
os: ubuntu-24.04-arm
120+
firefox-install-lang-package: true
121+
enable-managed-downloads: true
122+
- test-strategy: test_video_dynamic_name
123+
use-random-user: false
124+
test-video: true
125+
build-all: false
126+
os: ubuntu-24.04-arm
127+
firefox-install-lang-package: true
128+
enable-managed-downloads: true
129+
- test-strategy: test_video_standalone
130+
use-random-user: false
131+
test-video: true
132+
build-all: false
133+
os: ubuntu-24.04-arm
134+
firefox-install-lang-package: true
135+
enable-managed-downloads: true
136+
- test-strategy: test_node_docker
137+
use-random-user: false
138+
test-video: true
139+
build-all: false
140+
os: ubuntu-24.04-arm
141+
firefox-install-lang-package: true
142+
enable-managed-downloads: false
143+
- test-strategy: test_standalone_docker
144+
use-random-user: false
145+
test-video: true
146+
build-all: false
147+
os: ubuntu-24.04-arm
148+
firefox-install-lang-package: true
149+
enable-managed-downloads: true
150+
- test-strategy: test_parallel
151+
use-random-user: false
152+
test-video: false
153+
build-all: false
154+
os: ubuntu-24.04-arm
155+
firefox-install-lang-package: false
156+
enable-managed-downloads: true
157+
- test-strategy: test_node_relay
158+
use-random-user: false
159+
test-video: false
160+
build-all: false
161+
os: ubuntu-24.04-arm
162+
firefox-install-lang-package: true
163+
enable-managed-downloads: true
73164
steps:
74165
- name: Free Disk Space (Ubuntu)
75166
uses: jlumbroso/free-disk-space@main
@@ -96,7 +187,7 @@ jobs:
96187
python-version: '3.11'
97188
check-latest: true
98189
- name: Enable KVM
99-
if: matrix.test-strategy == 'test_node_relay'
190+
if: matrix.test-strategy == 'test_node_relay' && contains(matrix.os, 'arm') == false
100191
run: |
101192
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
102193
sudo udevadm control --reload-rules
@@ -143,19 +234,42 @@ jobs:
143234
LOG_LEVEL: ${{ github.event.inputs.log-level || 'INFO' }}
144235
TEST_PARALLEL_HARDENING: ${{ github.event.inputs.parallel-hardening || 'true' }}
145236
REQUEST_TIMEOUT: ${{ github.event.inputs.request-timeout || '400' }}
146-
- name: Run Docker Compose to ${{ matrix.test-strategy }}
237+
- name: Set environment variables
238+
run: |
239+
if [ -n "${TEST_FIREFOX_INSTALL_LANG_PACKAGE}" ]; then
240+
echo "TEST_FIREFOX_INSTALL_LANG_PACKAGE=${TEST_FIREFOX_INSTALL_LANG_PACKAGE}" >> $GITHUB_ENV
241+
fi
242+
if [ -n "${SELENIUM_ENABLE_MANAGED_DOWNLOADS}" ]; then
243+
echo "SELENIUM_ENABLE_MANAGED_DOWNLOADS=${SELENIUM_ENABLE_MANAGED_DOWNLOADS}" >> $GITHUB_ENV
244+
fi
245+
env:
246+
TEST_FIREFOX_INSTALL_LANG_PACKAGE: ${{ matrix.firefox-install-lang-package }}
247+
SELENIUM_ENABLE_MANAGED_DOWNLOADS: ${{ matrix.enable-managed-downloads }}
248+
- name: Run Docker Compose to ${{ matrix.test-strategy }} on AMD64
249+
if: contains(matrix.os, 'arm') == false
147250
uses: nick-invision/retry@master
148251
with:
149252
timeout_minutes: 40
150253
max_attempts: 2
151254
retry_wait_seconds: 60
152255
command: |
153256
USE_RANDOM_USER_ID=${{ matrix.use-random-user }} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make ${{ matrix.test-strategy }}
257+
- name: Run Docker Compose to ${{ matrix.test-strategy }} on ARM64
258+
if: contains(matrix.os, 'arm') == true
259+
uses: nick-invision/retry@master
260+
with:
261+
timeout_minutes: 40
262+
max_attempts: 2
263+
retry_wait_seconds: 60
264+
command: |
265+
USE_RANDOM_USER_ID=${{ matrix.use-random-user }} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} \
266+
TEST_FIREFOX_INSTALL_LANG_PACKAGE=${TEST_FIREFOX_INSTALL_LANG_PACKAGE} SELENIUM_ENABLE_MANAGED_DOWNLOADS=${SELENIUM_ENABLE_MANAGED_DOWNLOADS} \
267+
make ${{ matrix.test-strategy }}
154268
- name: Upload recorded video
155269
if: matrix.test-video == true
156270
uses: actions/upload-artifact@main
157271
with:
158-
name: "${{ matrix.test-strategy }}_artifacts"
272+
name: "${{ matrix.test-strategy }}_artifacts_${{ matrix.os }}"
159273
path: ./tests/videos/
160274
- name: Clean up Docker
161275
if: always()

.github/workflows/helm-chart-test.yml

+20-13
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,11 @@ permissions:
3434
jobs:
3535
build-and-test:
3636
name: Test K8s
37-
runs-on: ubuntu-24.04
37+
runs-on: ${{ matrix.os }}
3838
strategy:
3939
fail-fast: false
4040
matrix:
4141
include:
42-
- k8s-version: 'v1.25.16'
43-
test-strategy: playwright_connect_grid
44-
cluster: 'minikube'
45-
helm-version: 'v3.11.3'
46-
docker-version: '26.1.4'
47-
python-version: '3.8'
48-
test-upgrade: true
49-
service-mesh: true
5042
- k8s-version: 'v1.26.15'
5143
test-strategy: disabled
5244
cluster: 'minikube'
@@ -55,6 +47,7 @@ jobs:
5547
python-version: '3.8'
5648
test-upgrade: true
5749
service-mesh: false
50+
os: ubuntu-24.04
5851
- k8s-version: 'v1.27.16'
5952
test-strategy: job
6053
cluster: 'minikube'
@@ -63,6 +56,7 @@ jobs:
6356
python-version: '3.9'
6457
test-upgrade: true
6558
service-mesh: true
59+
os: ubuntu-24.04
6660
- k8s-version: 'v1.28.15'
6761
test-strategy: deployment
6862
cluster: 'minikube'
@@ -71,30 +65,43 @@ jobs:
7165
python-version: '3.10'
7266
test-upgrade: true
7367
service-mesh: true
74-
- k8s-version: 'v1.29.12'
68+
os: ubuntu-24.04
69+
- k8s-version: 'v1.29.13'
7570
test-strategy: job_https
7671
cluster: 'minikube'
7772
helm-version: 'v3.14.3'
7873
docker-version: '26.1.4'
7974
python-version: '3.11'
8075
test-upgrade: true
8176
service-mesh: false
82-
- k8s-version: 'v1.30.8'
77+
os: ubuntu-24.04
78+
- k8s-version: 'v1.30.9'
8379
test-strategy: job_hostname
8480
cluster: 'minikube'
8581
helm-version: 'v3.15.4'
8682
docker-version: '26.1.4'
8783
python-version: '3.12'
8884
test-upgrade: true
8985
service-mesh: false
90-
- k8s-version: 'v1.31.4'
86+
os: ubuntu-24.04
87+
- k8s-version: 'v1.31.5'
9188
test-strategy: deployment_https
9289
cluster: 'minikube'
9390
helm-version: 'v3.16.4'
9491
docker-version: '27.4.1'
9592
python-version: '3.13'
9693
test-upgrade: true
9794
service-mesh: false
95+
os: ubuntu-24.04
96+
- k8s-version: 'v1.32.1'
97+
test-strategy: playwright_connect_grid
98+
cluster: 'minikube'
99+
helm-version: 'v3.17.0'
100+
docker-version: '26.1.4'
101+
python-version: '3.10'
102+
test-upgrade: true
103+
service-mesh: true
104+
os: ubuntu-24.04
98105
env:
99106
CLUSTER: ${{ matrix.cluster }}
100107
KUBERNETES_VERSION: ${{ matrix.k8s-version }}
@@ -199,7 +206,7 @@ jobs:
199206
if: always()
200207
uses: actions/upload-artifact@main
201208
with:
202-
name: "${{ env.ARTIFACT_NAME }}_${{ env.CHART_FILE_NAME }}"
209+
name: "${{ env.ARTIFACT_NAME }}_${{ env.CHART_FILE_NAME }}_${{ matrix.os }}"
203210
path: ${{ env.CHART_PACKAGE_PATH }}
204211
- name: Upload chart test artifacts
205212
if: always()

0 commit comments

Comments
 (0)