Skip to content

Commit

Permalink
Hack setup-python to allow caching.
Browse files Browse the repository at this point in the history
  • Loading branch information
kdeldycke committed Jan 30, 2024
1 parent 3230960 commit 662a971
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/autofix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
# We're going to browse all new commits.
fetch-depth: 0
- name: Hack setup-python cache
# XXX Create an empty requirements.txt if this file (or pyproject.toml) doesn't exist.
# This work around and issue with setup-python for non-Python projects, which ends up with ends up
# with this error:
#
# Run actions/[email protected]
# with:
# python-version: 3.12
# cache: pip
# Installed versions
# Successfully set up CPython (3.12.1)
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
# [**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository
#
# This has been reported at: https://github.com/actions/setup-python/issues/807
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
# or https://github.com/actions/setup-python/issues/751
if: hashFiles('**/requirements.txt', '**/pyproject.toml') == ''
run: |
touch ./requirements.txt
- uses: actions/[email protected]
with:
python-version: "3.12"
Expand Down Expand Up @@ -186,6 +206,26 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Hack setup-python cache
# XXX Create an empty requirements.txt if this file (or pyproject.toml) doesn't exist.
# This work around and issue with setup-python for non-Python projects, which ends up with ends up
# with this error:
#
# Run actions/[email protected]
# with:
# python-version: 3.12
# cache: pip
# Installed versions
# Successfully set up CPython (3.12.1)
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
# [**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository
#
# This has been reported at: https://github.com/actions/setup-python/issues/807
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
# or https://github.com/actions/setup-python/issues/751
if: hashFiles('**/requirements.txt', '**/pyproject.toml') == ''
run: |
touch ./requirements.txt
- uses: actions/[email protected]
with:
python-version: "3.12"
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,26 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
# We're going to browse all new commits.
fetch-depth: 0
- name: Hack setup-python cache
# XXX Create an empty requirements.txt if this file (or pyproject.toml) doesn't exist.
# This work around and issue with setup-python for non-Python projects, which ends up with ends up
# with this error:
#
# Run actions/[email protected]
# with:
# python-version: 3.12
# cache: pip
# Installed versions
# Successfully set up CPython (3.12.1)
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
# [**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository
#
# This has been reported at: https://github.com/actions/setup-python/issues/807
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
# or https://github.com/actions/setup-python/issues/751
if: hashFiles('**/requirements.txt', '**/pyproject.toml') == ''
run: |
touch ./requirements.txt
- uses: actions/[email protected]
with:
python-version: "3.12"
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ jobs:
ref: ${{ github.event.pull_request.head.sha || github.sha }}
# We're going to browse all new commits.
fetch-depth: 0
- name: Hack setup-python cache
# XXX Create an empty requirements.txt if this file (or pyproject.toml) doesn't exist.
# This work around and issue with setup-python for non-Python projects, which ends up with ends up
# with this error:
#
# Run actions/[email protected]
# with:
# python-version: 3.12
# cache: pip
# Installed versions
# Successfully set up CPython (3.12.1)
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
# [**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository
#
# This has been reported at: https://github.com/actions/setup-python/issues/807
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
# or https://github.com/actions/setup-python/issues/751
if: hashFiles('**/requirements.txt', '**/pyproject.toml') == ''
run: |
touch ./requirements.txt
- uses: actions/[email protected]
with:
python-version: "3.12"
Expand Down Expand Up @@ -90,6 +110,26 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/[email protected]
- name: Hack setup-python cache
# XXX Create an empty requirements.txt if this file (or pyproject.toml) doesn't exist.
# This work around and issue with setup-python for non-Python projects, which ends up with ends up
# with this error:
#
# Run actions/[email protected]
# with:
# python-version: 3.12
# cache: pip
# Installed versions
# Successfully set up CPython (3.12.1)
# Error: No file in /home/runner/work/awesome-iam/awesome-iam matched to
# [**/requirements.txt or **/pyproject.toml], make sure you have checked out the target repository
#
# This has been reported at: https://github.com/actions/setup-python/issues/807
# In the future this might be addressed by: https://github.com/actions/setup-python/pull/762
# or https://github.com/actions/setup-python/issues/751
if: hashFiles('**/requirements.txt', '**/pyproject.toml') == ''
run: |
touch ./requirements.txt
- uses: actions/[email protected]
with:
python-version: "3.12"
Expand Down

0 comments on commit 662a971

Please sign in to comment.