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

Fix pipenv jobs #699

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/e2e-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,30 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup Python
id: cache-pipenv
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
- name: Prepare environment
shell: pwsh
run: |
mv ./__tests__/data/Pipfile.lock .
mv ./__tests__/data/Pipfile .
mv ./__tests__/test-pipenv.py .
- name: Install dependencies
shell: pwsh
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
if ("${{ matrix.python-version }}" -Match "pypy") {
pipenv install --keep-outdated --python pypy
pipenv install --python pypy # --keep-outdated
} else {
pipenv install --keep-outdated --python ${{ matrix.python-version }}
pipenv install --python ${{ matrix.python-version }} # --keep-outdated
}
- name: Run Python Script
run: pipenv run python test-pipenv.py

python-poetry-dependencies-caching:
name: Test poetry (Python ${{ matrix.python-version}}, ${{ matrix.os }})
Expand Down Expand Up @@ -112,20 +120,28 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Setup Python
id: cache-pipenv
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
cache-dependency-path: '**/pipenv-requirements.txt'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install dependencies
- name: Prepare environment
shell: pwsh
run: |
mv ./__tests__/data/Pipfile.lock .
mv ./__tests__/data/Pipfile .
mv ./__tests__/test-pipenv.py .
- name: Install dependencies
shell: pwsh
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
if ("${{ matrix.python-version }}" -Match "pypy") {
pipenv install --keep-outdated --python pypy
pipenv install --python pypy # --keep-outdated
} else {
pipenv install --keep-outdated --python ${{ matrix.python-version }}
pipenv install --python ${{ matrix.python-version }} # --keep-outdated
}
- name: Run Python Script
run: pipenv run python test-pipenv.py
2 changes: 1 addition & 1 deletion __tests__/cache-restore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {State} from '../src/cache-distributions/cache-distributor';

describe('restore-cache', () => {
const pipFileLockHash =
'a3bdcc71289e4979ca9e051810d81999cc99823109faf6912e17ff14c8e621a6';
'f8428d7cf00ea53a5c3702f0a9cb3cc467f76cd86a34723009350c4e4b32751a';
const requirementsHash =
'd8110e0006d7fb5ee76365d565eef9d37df1d11598b912d3eb66d398d57a1121';
const requirementsLinuxHash =
Expand Down
4 changes: 2 additions & 2 deletions __tests__/data/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ verify_ssl = true
name = "pypi"

[packages]
flake8 = "==4.0.1"
numpy = "==1.23.0"
flake8 = "==6.0.0"
numpy = "==1.25.1"

[dev-packages]

Expand Down
80 changes: 42 additions & 38 deletions __tests__/data/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion __tests__/data/pipenv-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
numpy==1.22.3
pandas==1.4.2
flake8==6.0.0
7 changes: 7 additions & 0 deletions __tests__/test-pipenv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import numpy as np

a = np.array([2, 3, 4])
print(type(a))

b = np.array([1.2, 3.5, 5.1])
print(type(b))