Skip to content

Commit d0faaa4

Browse files
committed
add front end tests to ci
1 parent 7cfa68d commit d0faaa4

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/pr.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- checks
1616
- conda-python-build
1717
- conda-python-tests
18+
- conda-frontend-tests
1819
- wheel-build
1920
- wheel-tests
2021
secrets: inherit
@@ -40,6 +41,14 @@ jobs:
4041
# This selects "ARCH=amd64 + the latest supported Python".
4142
matrix_filter: map(select(.ARCH == "amd64")) | max_by([(.PY_VER|split(".")|map(tonumber))]) | [.]
4243
script: ci/test_python.sh
44+
conda-frontend-tests:
45+
needs: conda-python-build
46+
secrets: inherit
47+
uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.10
48+
with:
49+
build_type: pull-request
50+
matrix_filter: map(select(.ARCH == "amd64")) | max_by([(.PY_VER|split(".")|map(tonumber))]) | [.]
51+
script: ci/test_frontend.sh
4352
wheel-build:
4453
needs: checks
4554
secrets: inherit

ci/test_frontend.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/bash
2+
# Copyright (c) 2023-2025, NVIDIA CORPORATION.
3+
# Run frontend (Jest) tests. Does not require GPU.
4+
5+
set -euo pipefail
6+
7+
. /opt/conda/etc/profile.d/conda.sh
8+
9+
rapids-logger "Generate frontend testing dependencies"
10+
rapids-dependency-file-generator \
11+
--output conda \
12+
--file-key checks \
13+
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml
14+
15+
rapids-mamba-retry env create --yes -f env.yaml -n test_frontend
16+
17+
# Temporarily allow unbound variables for conda activation.
18+
set +u
19+
conda activate test_frontend
20+
set -u
21+
22+
rapids-print-env
23+
24+
rapids-logger "Install JS dependencies"
25+
jlpm install
26+
27+
EXITCODE=0
28+
trap "EXITCODE=1" ERR
29+
set +e
30+
31+
rapids-logger "Run frontend tests (Jest)"
32+
jlpm test
33+
34+
rapids-logger "Frontend test script exiting with value: $EXITCODE"
35+
exit ${EXITCODE}

0 commit comments

Comments
 (0)