-
Notifications
You must be signed in to change notification settings - Fork 6
34 lines (31 loc) · 1.11 KB
/
check_newcd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# A CI script with github workflow to test the new commondata
name: Test new commondata
on:
push:
workflow_dispatch:
jobs:
test-commondata:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Install NNPDF data package 🐍
run: pip install ./nnpdf_data/'[filter]'
- name: Run the filters 📦
shell: bash -l {0}
run: |
here=$PWD
readarray -d '' array < <(find ./nnpdf_data/nnpdf_data/commondata -name "filter.py" -print0)
for datname in "${array[@]}"; do dirpath=${datname%/*}; cd $dirpath; python filter.py || exit $?; cd $here; done
- name: Check for modified files 🛎️
uses: tj-actions/verify-changed-files@v20
id: verify-changed-files
- name: List all changed files and fail if any 🛎️
if: steps.verify-changed-files.outputs.files_changed == 'true'
env:
CHANGED_FILES: ${{ steps.verify-changed-files.outputs.changed_files }}
run: |
echo "Changed files: $CHANGED_FILES"
exit 1