Skip to content

Commit 13bea39

Browse files
[CI] fix compat test (#2736)
* [CI] always run if triggered by workflow_dispatch * [CI] fix path * [CI] add missing pkgs
1 parent e652a76 commit 13bea39

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/compatibility.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,18 @@ jobs:
1313
prepare:
1414
runs-on: ubuntu-latest
1515
outputs:
16-
versions: ${{ steps.parser.outputs.versions }}
16+
versions: ${{ steps.parser.outputs.versions || '[]' }}
1717
steps:
1818
- uses: actions/checkout@v6
19+
with:
20+
fetch-depth: 2
1921

2022
- name: Check license line changed
2123
id: check
2224
run: |
23-
if git diff HEAD~1 HEAD -- pyproject.toml | grep -q '^[+-].*license = "Apache-2.0"'; then
25+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
26+
echo "changed=true" >> "$GITHUB_OUTPUT"
27+
elif git diff HEAD~1 HEAD -- pyproject.toml | grep -q '^[+-].*license = "Apache-2.0"'; then
2428
echo "changed=true" >> "$GITHUB_OUTPUT"
2529
else
2630
echo "changed=false" >> "$GITHUB_OUTPUT"
@@ -35,11 +39,13 @@ jobs:
3539
if: steps.check.outputs.changed == 'true'
3640
id: parser
3741
run: |
38-
versions=$(python ci_loop_versions.py setuptools ">=77.0.1,<83")
42+
python -m pip install --upgrade requests packaging
43+
versions=$(python .github/scripts/ci_loop_versions.py setuptools ">=77.0.1,<83")
3944
echo "versions=$versions" >> "$GITHUB_OUTPUT"
4045
4146
check:
4247
needs: prepare
48+
if: needs.prepare.outputs.versions != '[]'
4349
runs-on: ubuntu-latest
4450
strategy:
4551
fail-fast: false

0 commit comments

Comments
 (0)