@@ -20,18 +20,55 @@ concurrency:
2020 cancel-in-progress : true
2121
2222jobs :
23+ changed-files :
24+ if : github.event_name != 'schedule'
25+ runs-on : ubuntu-latest
26+ outputs :
27+ any_changed : ${{ steps.changed-files.outputs.any_changed }}
28+ docs_changed : ${{ steps.changed-files.outputs.docs_any_changed }}
29+ steps :
30+ - uses : actions/checkout@v4
31+ with :
32+ fetch-depth : 0
33+ - uses : step-security/changed-files@v46
34+ id : changed-files
35+ with :
36+ base_sha : main
37+ files_yaml : |
38+ framework:
39+ - '3rdparty/**'
40+ - 'sub-packages/**'
41+ - 'docker_build_patches/**'
42+ - 'requirements-*.txt'
43+ - 'Dockerfile'
44+ docs:
45+ - 'docs/**.ipynb'
46+ - name : List all changed files
47+ env :
48+ ALL_CHANGED_FILES : ${{ steps.changed-files.outputs.all_changed_files }}
49+ run : |
50+ for file in ${ALL_CHANGED_FILES}; do
51+ echo "$file was changed"
52+ done
53+
2354 pre-commit :
2455 runs-on : ubuntu-latest
2556 steps :
2657 - uses : actions/checkout@v4
2758 with :
2859 fetch-depth : 0
29- submodules : " recursive"
3060 - uses : actions/setup-python@v5
3161 with :
3262 python-version : " 3.13"
3363 cache : " pip"
34- - run : pip install -r requirements-dev.txt
64+ - name : Setup UV
65+ uses : astral-sh/setup-uv@v6
66+ with :
67+ enable-cache : true
68+ - run : |
69+ uv tool install pre-commit --with pre-commit-uv --force-reinstall
70+ uv tool install tach>=0.9.0
71+ uv tool update-shell
3572 - run : ./ci/scripts/static_checks.sh
3673
3774 # With copy-pr-bot, we need to get the PR labels from the PR API rather than from the event metadata.
65102 needs :
66103 - pre-commit
67104 - get-pr-labels
105+ - changed-files
68106 runs-on : linux-amd64-cpu16
69- if : ${{ !contains(fromJSON(needs.get-pr-labels.outputs.labels || '[]'), 'SKIP_CI') }}
107+ if : ${{ !contains(fromJSON(needs.get-pr-labels.outputs.labels || '[]'), 'SKIP_CI') && (needs.changed-files.outputs.any_changed == 'true' || needs.changed-files.result == 'skipped') }}
70108 steps :
71109 - name : Login to Docker Hub
72110 uses : docker/login-action@v3
@@ -185,10 +223,12 @@ jobs:
185223 needs :
186224 - build-bionemo-image
187225 - get-pr-labels
226+ - changed-files
188227 runs-on : linux-amd64-gpu-l4-latest-1
189228 if : |
190229 github.event_name == 'schedule' || github.event_name == 'merge_group' ||
191- contains(fromJSON(needs.get-pr-labels.outputs.labels || '[]'), 'INCLUDE_NOTEBOOKS_TESTS')
230+ contains(fromJSON(needs.get-pr-labels.outputs.labels || '[]'), 'INCLUDE_NOTEBOOKS_TESTS') ||
231+ needs.changed-files.outputs.docs_changed == 'true'
192232 container :
193233 image : svcbionemo023/bionemo-framework:${{ github.run_id }}
194234 credentials :
0 commit comments