Skip to content

Commit 3892520

Browse files
committed
ui-e2e-tests: steps to enable cypress tests
This doesn't get the job fully working yet, but it's an improvement. Epic: none Part of cockroachdb#106584 Release note: None
1 parent 98cd2f0 commit 3892520

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM cypress/browsers:node16.14.2-slim-chrome100-ff99-edge
2+
RUN curl -fsSL https://get.pnpm.io/install.sh | env SHELL=bash PNPM_HOME=/usr/local/bin PNPM_VERSION=8.5.1 sh -
3+
RUN pnpm --version

pkg/ui/workspaces/e2e-tests/build/compose-entrypoint.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ set -uemo pipefail
33

44
set -x
55

6-
# Copy the /e2e tree into /scratch and remove any existing node_modules, to
6+
# Copy the /ui tree into /scratch and remove any existing node_modules, to
77
# prevent files with unexpected owners from escaping
88
mkdir /scratch
9-
cp --recursive --no-target-directory --no-preserve=owner /e2e /scratch
9+
cp --recursive --no-target-directory --no-preserve=owner /ui /scratch
1010
cd /scratch
1111

1212
# Remove and reinstall any node_modules that may have been copied, since they're
1313
# potentially specific to the host platform.
1414
rm -rf node_modules/
15-
pnpm install --filter . --force --frozen-lockfile
15+
pnpm install --filter workspaces/e2e-tests --force --frozen-lockfile
1616

1717
# Run tests, passing extra CLI arguments through to Cypress
18-
pnpm run cy:run "$@"
18+
pnpm run -C ./workspaces/e2e-tests cy:run "$@"

pkg/ui/workspaces/e2e-tests/compose.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,12 @@ services:
1818
COCKROACH_DATABASE: movr
1919

2020
cypress:
21-
image: cypress/browsers:node16.14.2-slim-chrome100-ff99-edge
22-
working_dir: /e2e
23-
entrypoint: ./build/compose-entrypoint.sh
21+
build:
22+
context: .
23+
dockerfile: Dockerfile.cypress
24+
image: crdb_ci-cypress_20230719
25+
working_dir: /ui
26+
entrypoint: ./workspaces/e2e-tests/build/compose-entrypoint.sh
2427
environment:
2528
IS_DOCKER: "1"
2629
depends_on:
@@ -29,7 +32,7 @@ services:
2932
networks:
3033
- db
3134
volumes:
32-
- ./:/e2e
35+
- ../../:/ui
3336
- ./artifacts:/artifacts
3437

3538
networks:

0 commit comments

Comments
 (0)