Refactor examples repo into deep-dives and quick-starts #2
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
| # This workflow is designed to test the notebooks in "notebooks/chunking" | |
| # This job can be coppied for end to end tests of notebooks in other working directories | |
| name: Chunking Tests | |
| # trigger on open pull requests only | |
| on: | |
| pull_request: | |
| branches: | |
| - "main" | |
| env: | |
| # dependencies that need to be installed using pip for testing to work | |
| TESTING_PIP_DEPENDENCIES: "papermill nbformat ipykernel" | |
| jobs: | |
| end_to_end: | |
| strategy: | |
| matrix: | |
| # add notebooks within the "model-customization/data-processing/chunking" repo to end to end test here | |
| notebooks_to_test: ["docling-chunking.ipynb"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: pip | |
| - name: Install Testing Tools | |
| run: | | |
| pip install ${{ env.TESTING_PIP_DEPENDENCIES }} | |
| ipython kernel install --name "python3" --user | |
| - name: Checkout "validate-notebooks" in-house CI action | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| repository: instructlab/ci-actions | |
| path: ci-actions | |
| ref: v0.2.0 | |
| sparse-checkout: actions/validate-notebooks | |
| - name: Validate Jupyter Notebooks | |
| uses: ./ci-actions/actions/validate-notebooks | |
| with: | |
| path: "./model-customization/data-processing/chunking/${{ matrix.notebooks_to_test }}" | |
| - name: Run End To End Tests | |
| working-directory: ./model-customization/data-processing/chunking | |
| # NOTE: for this to work, cells with parameters need to be tagged as parameters in the target notebooks | |
| run: papermill ${{ matrix.notebooks_to_test }} ${{ matrix.notebooks_to_test }}.tmp |