Skip to content

Commit

Permalink
github-actions/install-pnl: Fix lookup of dep packages (#2392)
Browse files Browse the repository at this point in the history
Check all requirements files.
Account for -/_ ambiguity in package names.
Skip the check when building the "base" documentation variant.

Fixes: 0aa4359
("github-actions/pnl-install: Check if a newly bumped dependency is
rolled back during installation (#2390)")

Signed-off-by: Jan Vesely <[email protected]>
  • Loading branch information
jvesely authored Apr 20, 2022
1 parent 0aa4359 commit 4dbd0c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/actions/install-pnl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ runs:
fi
- name: Install updated package
if: ${{ startsWith(github.head_ref, 'dependabot/pip') }}
if: ${{ startsWith(github.head_ref, 'dependabot/pip') && matrix.pnl-version != 'base' }}
shell: bash
id: new_package
run: |
export NEW_PACKAGE=`echo '${{ github.head_ref }}' | cut -f 4 -d/ | sed 's/-gt.*//' | sed 's/-lt.*//'`
echo "::set-output name=new_package::$NEW_PACKAGE"
pip install "`grep $NEW_PACKAGE requirements*.txt | head -n1`"
pip install "`echo $NEW_PACKAGE | sed 's/[-_]/./g' | xargs grep *requirements.txt -h -e | head -n1`"
pip show "$NEW_PACKAGE" | grep 'Version' | tee new_version.deps
- name: Python dependencies
Expand All @@ -78,7 +78,7 @@ runs:
done
- name: Check updated package
if: ${{ startsWith(github.head_ref, 'dependabot/pip') }}
if: ${{ startsWith(github.head_ref, 'dependabot/pip') && matrix.pnl-version != 'base' }}
shell: bash
run: |
pip show ${{ steps.new_package.outputs.new_package }} | grep 'Version' | tee installed_version.deps
Expand Down

0 comments on commit 4dbd0c9

Please sign in to comment.