don't skip checkout #19
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: "BioNeMo Recipes CI" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - "pull-request/[0-9]+" | |
| - "dependabot/**" | |
| merge_group: | |
| types: [checks_requested] | |
| schedule: | |
| - cron: "0 7 * * *" # Runs at 7 AM UTC daily (12 AM MST) | |
| defaults: | |
| run: | |
| shell: bash -x -e -u -o pipefail {0} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| changed-dirs: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| any_changed: ${{ steps.changed-files.outputs.any_changed }} | |
| all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }} | |
| dirs: ${{ steps.set-dirs.outputs.dirs }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: step-security/changed-files@v46 | |
| with: | |
| base_sha: main | |
| dir_names: true | |
| dir_names_max_depth: 2 | |
| files: | | |
| models/** | |
| recipes/** | |
| - id: set-dirs | |
| # TODO: add models to the list of dirs. We should also use changed-files to filter this list of directories to | |
| # only include directories that have changed files if we're running pull-request or merge-group actions, but run all the | |
| # directories if we're running a schedule action. | |
| run: | | |
| DIRS=$(ls -d recipes/*/ | jq -R -s -c 'split("\n")[:-1]') | |
| echo "dirs=$DIRS" >> $GITHUB_OUTPUT | |
| - name: Show output | |
| run: | | |
| echo '${{ toJSON(steps.changed-files.outputs) }}' | |
| shell: | |
| bash | |
| per-folder-test: | |
| needs: changed-dirs | |
| runs-on: linux-amd64-gpu-l4-latest-1 | |
| container: | |
| image: nvcr.io/nvidia/pytorch:25.06-py3 | |
| strategy: | |
| matrix: | |
| dir: ${{ fromJson(needs.changed-dirs.outputs.dirs) }} | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| sparse-checkout: '${{ matrix.dir }}' | |
| sparse-checkout-cone-mode: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| working-directory: ${{ matrix.dir }} | |
| run: uv pip install --system --break-system-packages -r requirements.txt | |
| - name: Run tests | |
| working-directory: ${{ matrix.dir }} | |
| run: pytest -v . |