Skip to content

Commit 36256f0

Browse files
committed
Move manifest check to core-library GHA job
1 parent 9923df5 commit 36256f0

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

.github/workflows/ci_poetry.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,23 @@ jobs:
4242
- name: Install dependencies (without extras)
4343
run: poetry install --with dev --without docs --no-interaction
4444

45+
# Check manifest has not changed - START
46+
- name: Regenerate the manifest
47+
run: poetry run python fractal_tasks_core/dev/create_manifest.py
48+
- name: Setup friendly diff style
49+
run: echo "*.json diff=json" >> .gitattributes && git config diff.json.textconv "jq --sort-keys '.' \$1"
50+
- name: Run git diff for manifest
51+
run: git diff ./fractal_tasks_core/__FRACTAL_MANIFEST__.json
52+
- name: Check if manifest has changed
53+
run: |
54+
if [ -n "$(git diff --exit-code ./fractal_tasks_core/__FRACTAL_MANIFEST__.json)" ]; then
55+
echo "__FRACTAL_MANIFEST__.json has changed. Please run 'poetry run python fractal_tasks_core/dev/create_manifest.py' and commit the changes."
56+
exit 1
57+
else
58+
echo "__FRACTAL_MANIFEST__.json has not changed."
59+
fi
60+
# Check manifest has not changed - END
61+
4562
- name: Test core library with pytest
4663
env:
4764
COVERAGE_FILE: coverage-data-core-${{ matrix.python-version }}
@@ -87,23 +104,6 @@ jobs:
87104
- name: Install dependencies (including fractal-tasks extra)
88105
run: poetry install --with dev --without docs --no-interaction -E fractal-tasks
89106

90-
# Check manifest has not changed - START
91-
- name: Regenerate the manifest
92-
run: poetry run python fractal_tasks_core/dev/create_manifest.py
93-
- name: Setup friendly diff style
94-
run: echo "*.json diff=json" >> .gitattributes && git config diff.json.textconv "jq --sort-keys '.' \$1"
95-
- name: Run git diff for manifest
96-
run: git diff ./fractal_tasks_core/__FRACTAL_MANIFEST__.json
97-
- name: Check if manifest has changed
98-
run: |
99-
if [ -n "$(git diff --exit-code ./fractal_tasks_core/__FRACTAL_MANIFEST__.json)" ]; then
100-
echo "__FRACTAL_MANIFEST__.json has changed. Please run 'poetry run python fractal_tasks_core/dev/create_manifest.py' and commit the changes."
101-
exit 1
102-
else
103-
echo "__FRACTAL_MANIFEST__.json has not changed."
104-
fi
105-
# Check manifest has not changed - END
106-
107107
- name: Cache Pooch folder
108108
id: cache-pooch-folder
109109
uses: actions/cache@v4

0 commit comments

Comments
 (0)