|
17 | 17 | # This output will be 'true' if files in the 'table_related_paths' list changed, 'false' otherwise. |
18 | 18 | table_paths_changed: ${{ steps.filter.outputs.table_related_paths }} |
19 | 19 | background_cb_changed: ${{ steps.filter.outputs.background_paths }} |
| 20 | + packaging_paths_changed: ${{ steps.filter.outputs.packaging_paths }} |
20 | 21 | steps: |
21 | 22 | - name: Checkout repository |
22 | 23 | uses: actions/checkout@v4 |
|
35 | 36 | - 'dash/_callback.py' |
36 | 37 | - 'dash/_callback_context.py' |
37 | 38 | - 'requirements/**' |
| 39 | + packaging_paths: |
| 40 | + - 'setup.py' |
| 41 | + - 'pyproject.toml' |
| 42 | + - 'dash/version.py' |
| 43 | + - 'MANIFEST.in' |
| 44 | + - 'requirements/build.txt' |
| 45 | + - 'requirements/install.txt' |
| 46 | + - 'tests/test_build/**' |
38 | 47 |
|
39 | 48 | build: |
40 | 49 | name: Build Dash Package |
@@ -441,3 +450,66 @@ jobs: |
441 | 450 | run: | |
442 | 451 | cd components/dash-table |
443 | 452 | pytest --nopercyfinalize --headless --splits 3 --group ${{ matrix.test-group }} |
| 453 | +
|
| 454 | + packaging-tests: |
| 455 | + name: Package Build Tests |
| 456 | + runs-on: ubuntu-latest |
| 457 | + needs: [changes_filter] |
| 458 | + if: | |
| 459 | + (github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev')) || |
| 460 | + needs.changes_filter.outputs.packaging_paths_changed == 'true' |
| 461 | + timeout-minutes: 15 |
| 462 | + |
| 463 | + steps: |
| 464 | + - name: Checkout repository |
| 465 | + uses: actions/checkout@v4 |
| 466 | + with: |
| 467 | + fetch-depth: 0 |
| 468 | + |
| 469 | + - name: Setup Python |
| 470 | + uses: actions/setup-python@v5 |
| 471 | + with: |
| 472 | + python-version: '3.11' |
| 473 | + |
| 474 | + - name: Setup Node.js |
| 475 | + uses: actions/setup-node@v4 |
| 476 | + with: |
| 477 | + node-version: '20' |
| 478 | + cache: 'npm' |
| 479 | + |
| 480 | + - name: Install uv |
| 481 | + uses: astral-sh/setup-uv@v4 |
| 482 | + with: |
| 483 | + enable-cache: true |
| 484 | + |
| 485 | + - name: Install build dependencies |
| 486 | + run: | |
| 487 | + uv sync --extra build --extra dev |
| 488 | + uv pip install pytest |
| 489 | + |
| 490 | + - name: Install JavaScript dependencies |
| 491 | + run: npm ci |
| 492 | + |
| 493 | + - name: Build components (required for packaging tests) |
| 494 | + run: npm run build |
| 495 | + |
| 496 | + - name: Run packaging tests |
| 497 | + run: | |
| 498 | + pytest tests/test_build/ -v --tb=short |
| 499 | + |
| 500 | + - name: Test wheel installation with extras |
| 501 | + run: | |
| 502 | + # Build the wheel |
| 503 | + uv build --wheel --out-dir dist-test |
| 504 | + |
| 505 | + # Test basic installation |
| 506 | + uv pip install dist-test/*.whl |
| 507 | + |
| 508 | + # Test dev extra installation |
| 509 | + uv pip install --force-reinstall "dist-test/*.whl[dev]" |
| 510 | + |
| 511 | + # Test import and basic functionality |
| 512 | + python -c "import dash; print(f'Dash {dash.__version__} imported successfully')" |
| 513 | + |
| 514 | + # Test dev tools are available |
| 515 | + python -c "import fire, coloredlogs, yaml; print('Dev dependencies available')" |
0 commit comments