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

Rework pipenv caching test #375

Merged
merged 7 commits into from Apr 4, 2022
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
20 changes: 12 additions & 8 deletions .github/workflows/e2e-cache.yml
Expand Up @@ -23,7 +23,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', 'pypy-3.7-v7.x']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Python
uses: ./
with:
Expand All @@ -41,7 +41,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', 'pypy-3.7-v7.x']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Python
uses: ./
with:
Expand All @@ -50,7 +50,9 @@ jobs:
- name: Install pipenv
run: pipx install pipenv
- name: Install dependencies
run: pipenv install numpy
run: |
cd __tests__/data
pipenv install --verbose

python-poetry-dependencies-caching:
name: Test poetry (Python ${{ matrix.python-version}}, ${{ matrix.os }})
Expand All @@ -61,7 +63,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', 'pypy-3.7-v7.x']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Setup Python
Expand All @@ -83,7 +85,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', 'pypy-3.7-v7.x']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Python
uses: ./
with:
Expand All @@ -102,14 +104,16 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ['3.9', 'pypy-3.7-v7.x']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup Python
uses: ./
with:
python-version: ${{ matrix.python-version }}
cache: 'pipenv'
cache-dependency-path: '**/requirements-linux.txt'
cache-dependency-path: '**/pipenv-requirements.txt'
- name: Install pipenv
run: pipx install pipenv
- name: Install dependencies
run: pipenv install numpy
run: |
cd __tests__/data
pipenv install --verbose
2 changes: 1 addition & 1 deletion __tests__/cache-restore.test.ts
Expand Up @@ -5,7 +5,7 @@ import {getCacheDistributor} from '../src/cache-distributions/cache-factory';

describe('restore-cache', () => {
const pipFileLockHash =
'67d817abcde9c72da0ed5b8f235647cb14638b9ff9d742b42e4406d2eb16fe3c';
'd1dd6218299d8a6db5fc2001d988b34a8b31f1e9d0bb4534d377dde7c19f64b3';
const requirementsHash =
'd8110e0006d7fb5ee76365d565eef9d37df1d11598b912d3eb66d398d57a1121';
const requirementsLinuxHash =
Expand Down
2 changes: 1 addition & 1 deletion __tests__/cache-save.test.ts
Expand Up @@ -6,7 +6,7 @@ import {State} from '../src/cache-distributions/cache-distributor';

describe('run', () => {
const pipFileLockHash =
'67d817abcde9c72da0ed5b8f235647cb14638b9ff9d742b42e4406d2eb16fe3c';
'd1dd6218299d8a6db5fc2001d988b34a8b31f1e9d0bb4534d377dde7c19f64b3';
const requirementsHash =
'd8110e0006d7fb5ee76365d565eef9d37df1d11598b912d3eb66d398d57a1121';
const requirementsLinuxHash =
Expand Down
13 changes: 13 additions & 0 deletions __tests__/data/Pipfile
@@ -0,0 +1,13 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
numpy = "1.22.3"
pandas = "1.4.2"

[dev-packages]

[requires]
python_version = "*"