Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mispell guard and fix pip cache #155

Merged
merged 2 commits into from
Nov 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 21 additions & 6 deletions .github/actions/base-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ runs:
DEFAULT_PYTHON="3.11"
elif [ $DEPENDENCY_TYPE == "minimum" ]; then
DEFAULT_PYTHON="3.8"
elif [ $DEPENDENCY_TYPE != "standard" ]; then
echo "Unrecognized dependency type $DEPENDENCY_TYPE"
exit 1
else
DEFAULT_PYTHON="3.10"
fi
Expand All @@ -39,19 +42,31 @@ runs:
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: 'pip'
cache-dependency-path: |
**/setup.cfg
**/setup.py
**/pyproject.toml
**/requirements*.txt

# Cache pip
# We cannot use the builtin cache because it errors out with the files
# are not present.
- name: Get pip cache dir
id: pip-cache
shell: bash
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: Cache pip
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ env.CACHE_PREFIX }}-pip-${{ env.PYTHON_VERSION }}-${{ hashFiles('setup.cfg', 'setup.py', '**/requirements.txt') }}
restore-keys: |
${{ env.CACHE_PREFIX }}-pip-${{ env.PYTHON_VERSION }}

- name: Install node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

# Cache yarn
# We cannot use the builtin cache because it errors out with the files
# are not present.
- name: Get yarn cache directory path
id: yarn-cache-dir-path
shell: bash
Expand Down