Skip to content

Commit

Permalink
CI: pip list action (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
akihironitta authored Sep 8, 2022
1 parent 215a983 commit 94660c8
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/actions/pip-list/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Print pip list
description: Print pip list for quick access to environment information

inputs:
unfold:
description: Whether to unfold the output of pip list
required: false
default: "false"

runs:
using: "composite"
steps:

- name: pip list
run: |
if [ "${{ inputs.unfold }}" = "true" ]; then
echo '<details open>' >> $GITHUB_STEP_SUMMARY
else
echo '<details>' >> $GITHUB_STEP_SUMMARY
fi
echo '<summary>pip list</summary>' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
pip list >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
echo '' >> $GITHUB_STEP_SUMMARY
echo '</details>' >> $GITHUB_STEP_SUMMARY
pip list # also print to stdout
shell: bash
4 changes: 4 additions & 0 deletions .github/workflows/check-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
pip install mypy types-setuptools # don't use --upgrade to respect the version installed via setup.py
pip list
- uses: ./.github/actions/pip-list
with:
unfold: true

- name: Check typing
# mypy uses the config file found in the following order:
# 1. mypy.ini
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
pip list
shell: bash

- uses: ./.github/actions/pip-list

- name: Test Documentation
working-directory: ${{ inputs.docs-dir }}
env:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
pip --version
pip list
- uses: ./.github/actions/pip-list

- uses: ./.github/actions/unittesting
with:
python-version: ${{ matrix.python-version }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
pip list
shell: bash

- uses: ./.github/actions/pip-list

- name: Make Documentation
run: |
# First run the same pipeline as Read-The-Docs
Expand Down

0 comments on commit 94660c8

Please sign in to comment.