Skip to content

Commit

Permalink
with cache pip
Browse files Browse the repository at this point in the history
  • Loading branch information
priya-kinthali committed Dec 17, 2024
1 parent 152e7fb commit 552caec
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 162 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/test-769.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/test-983-actions-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Reproduce Python 3.11.11 Error

on:
# push:
# branches:
# - test-983
workflow_dispatch:

jobs:
test:
name: Run Tests
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11.11"

- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- name: Cache pipenv virtualenvs
uses: actions/cache@v4
id: pipenv-cache
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv-
- name: Install dependencies
if: steps.pipenv-cache.outputs.cache-hit != 'true'
run: |
pipenv install --deploy --dev
pipenv install -e .
25 changes: 15 additions & 10 deletions .github/workflows/test-983.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Reproduce Python 3.11.11 Error

on: [push, pull_request]
on:
push:
branches:
- test-983
workflow_dispatch:

jobs:
test:
Expand All @@ -15,22 +19,23 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: "3.11.11"
cache: 'pipenv' # caching pip dependencies

- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- name: Cache pipenv virtualenvs
uses: actions/cache@v4
id: pipenv-cache
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
restore-keys: |
${{ runner.os }}-pipenv-
# - name: Cache pipenv virtualenvs
# uses: actions/cache@v4
# id: pipenv-cache
# with:
# path: ~/.local/share/virtualenvs
# key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
# restore-keys: |
# ${{ runner.os }}-pipenv-

- name: Install dependencies
if: steps.pipenv-cache.outputs.cache-hit != 'true'
# if: steps.pipenv-cache.outputs.cache-hit != 'true'
run: |
pipenv install --deploy --dev
pipenv install -e .
25 changes: 0 additions & 25 deletions .github/workflows/test-dev.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/test-nox.yml

This file was deleted.

60 changes: 19 additions & 41 deletions .github/workflows/test-sample.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,28 @@
name: Test Python Setup
name: Setup Python on Windows Server 2022

on:
on:
push:
branches:
- test-769
workflow_dispatch:


jobs:
test-python-setup:
runs-on: macos-latest

test-python:
runs-on: macos-13
steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: '3.13.0-alpha - 3.13.0'
# - name: Verify Python Version
# run: python --version
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python 3.8.10
uses: priya-kinthali/setup-python@test-930
with:
python-version: "3.8.18"
- name: Upgrade pip
run: python3.8 -m pip install --upgrade pip
# - uses: actions/setup-python@v5
# with:
# python-version: '>=3.9 <3.10'
# - uses: actions/setup-python@v5
# with:
# python-version: '3.13'
# cache: 'pipenv'
# - name: Install pipenv
# run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
# - run: pipenv install
# - name: Verify Python Version
# run: python --version
# - name: Install poetry
# run: pipx install poetry
# - uses: actions/setup-python@v5
# with:
# python-version: '3.13'
# cache: 'poetry'
# - run: poetry install
# - run: poetry run pytest
# - uses: actions/setup-python@v5
# id: cp313
# with:
# python-version: "3.13"
# - run: pipx run --python '${{ steps.cp313.outputs.python-path }}' nox --version
python-version: 3.8.10
cache: 'pip'


- name: Display Python version
run: python --version

- name: Install dependencies
run: pip install -r requirements.txt

0 comments on commit 552caec

Please sign in to comment.