Skip to content

Commit 0fdf1b3

Browse files
committedFeb 5, 2025
test(client_test): convert client_test to use nodejs/playwright
Playwright has better support for parallelism by default.
1 parent 79a71c6 commit 0fdf1b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+29622
-1004
lines changed
 

‎.github/workflows/build.yml

+33-4
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,16 @@ jobs:
3535
cache: "npm"
3636
cache-dependency-path: |
3737
package-lock.json
38-
examples/**/package-lock.json
3938
# uv required for javascript tests
4039
- uses: astral-sh/setup-uv@v5
4140
with:
42-
enable-cache: true
41+
enable-cache: false
4342
# go needed for fake_gcs_server used by the javascript tests
4443
- name: Setup go
4544
uses: actions/setup-go@v5
4645
with:
4746
go-version: "stable"
48-
- run: npm install
47+
- run: npm ci
4948
- run: npm run format:fix
5049
- name: Check for dirty working directory
5150
run: git diff --exit-code
@@ -83,6 +82,36 @@ jobs:
8382
name: client
8483
path: dist/client
8584
if: ${{ runner.os == 'Linux' }}
85+
example-project-test:
86+
runs-on: ubuntu-latest
87+
steps:
88+
- uses: actions/checkout@v4
89+
- name: Install pnpm
90+
uses: pnpm/action-setup@v4
91+
with:
92+
version: 10
93+
- uses: actions/setup-node@v4
94+
with:
95+
node-version: 22.x
96+
cache: "pnpm"
97+
cache-dependency-path: |
98+
examples/**/pnpm-lock.yaml
99+
- uses: actions/setup-node@v4
100+
with:
101+
node-version: 22.x
102+
cache: "npm"
103+
cache-dependency-path: |
104+
package-lock.json
105+
- run: npm ci
106+
- run: npm run example-project-test -- --reporter=html
107+
- name: Upload report and built clients
108+
uses: actions/upload-artifact@v4
109+
if: ${{ !cancelled() }}
110+
with:
111+
name: example-project-test-results
112+
path: |
113+
playwright-report/
114+
examples/*/*/dist/
86115
87116
# Builds Python package and runs Python tests
88117
#
@@ -164,7 +193,7 @@ jobs:
164193
id: pip-cache
165194
run: |
166195
echo "dir=$(pip cache dir)" >> "$GITHUB_OUTPUT"
167-
- run: npm install
196+
- run: npm ci
168197
- run: |
169198
build_info="{'tag':'$(git describe --always --tags)', 'url':'https://github.com/google/neuroglancer/commit/$(git rev-parse HEAD)', 'timestamp':'$(date)'}"
170199
npm run build-python -- --no-typecheck --no-lint --define NEUROGLANCER_BUILD_INFO="${build_info}"

‎.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ tsconfig.tsbuildinfo
2121
.eslintcache
2222
/lib
2323
/.firebase
24+
/test-results
25+
/playwright-report
26+
-/docs/python/api/index.rst
27+
/docs/python/api/*.rst

0 commit comments

Comments
 (0)
Please sign in to comment.