Repository navigation
0.16.0 #7
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| workflow_dispatch: | |
| workflow_call: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: viewer/package-lock.json | |
| - name: Install viewer dependencies | |
| run: npm ci | |
| working-directory: viewer | |
| - name: Build viewer | |
| run: npm run build | |
| working-directory: viewer | |
| - name: Check viewer | |
| run: npm run lint && npm test | |
| working-directory: viewer | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Build package | |
| run: uv build | |
| - name: Install built package for browser validation | |
| run: | | |
| uv venv .venv | |
| uv pip install dist/*.whl | |
| .venv/bin/python viewer/tests/prepare.py | |
| - name: Generate the published examples from scratch | |
| run: | | |
| uv pip install -r examples/requirements.txt | |
| .venv/bin/python examples/build_gallery.py --output results/gallery | |
| .venv/bin/python viewer/export_docs.py --source results/gallery --output results/viewer-release/gallery | |
| - name: Install browser | |
| run: npx playwright install --with-deps chromium | |
| working-directory: viewer | |
| - name: Verify local viewer and portable report | |
| run: npm run test:browser | |
| working-directory: viewer | |
| env: | |
| PLAYWRIGHT_CHANNEL: chromium | |
| VIEWER_GALLERY_URL: http://127.0.0.1:8722/gallery/index.html | |
| - name: Upload dist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ |