From 552caecfb91a64863e90750cd36d28ec8406c73d Mon Sep 17 00:00:00 2001 From: priya-kinthali Date: Tue, 17 Dec 2024 15:14:40 +0530 Subject: [PATCH] with cache pip --- .github/workflows/test-769.yml | 28 --------- .github/workflows/test-983-actions-cache.yml | 40 +++++++++++++ .github/workflows/test-983.yml | 25 ++++---- .github/workflows/test-dev.yml | 25 -------- .github/workflows/test-nox.yml | 58 ------------------- .github/workflows/test-sample.yml | 60 +++++++------------- 6 files changed, 74 insertions(+), 162 deletions(-) delete mode 100644 .github/workflows/test-769.yml create mode 100644 .github/workflows/test-983-actions-cache.yml delete mode 100644 .github/workflows/test-dev.yml delete mode 100644 .github/workflows/test-nox.yml diff --git a/.github/workflows/test-769.yml b/.github/workflows/test-769.yml deleted file mode 100644 index a2d9ab7..0000000 --- a/.github/workflows/test-769.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Setup Python on Windows Server 2022 - -on: - push: - branches: - - test-769 - workflow_dispatch: - - -jobs: - test-python: - runs-on: macos-13 - steps: - - 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.10 - cache: 'pip' - - - - name: Display Python version - run: python --version - - - name: Install dependencies - run: pip install -r requirements.txt \ No newline at end of file diff --git a/.github/workflows/test-983-actions-cache.yml b/.github/workflows/test-983-actions-cache.yml new file mode 100644 index 0000000..717b321 --- /dev/null +++ b/.github/workflows/test-983-actions-cache.yml @@ -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 . \ No newline at end of file diff --git a/.github/workflows/test-983.yml b/.github/workflows/test-983.yml index 91434b2..8eae09e 100644 --- a/.github/workflows/test-983.yml +++ b/.github/workflows/test-983.yml @@ -1,6 +1,10 @@ name: Reproduce Python 3.11.11 Error -on: [push, pull_request] +on: + push: + branches: + - test-983 + workflow_dispatch: jobs: test: @@ -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 . \ No newline at end of file diff --git a/.github/workflows/test-dev.yml b/.github/workflows/test-dev.yml deleted file mode 100644 index c20ba57..0000000 --- a/.github/workflows/test-dev.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Setup Python on Windows Server 2022 - -on: - # push: - # branches: - # - test-769 - workflow_dispatch: - - -jobs: - setup-dev-version: - name: Setup 3.14-dev ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest, macos-13] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: setup-python 3.14-dev - uses: actions/setup-python@v5 - with: - python-version: '3.14-dev' \ No newline at end of file diff --git a/.github/workflows/test-nox.yml b/.github/workflows/test-nox.yml deleted file mode 100644 index 4c78a31..0000000 --- a/.github/workflows/test-nox.yml +++ /dev/null @@ -1,58 +0,0 @@ -name: Setup Python on Windows Server 2022 - -on: - # push: - # branches: - # - test-769 - workflow_dispatch: - -jobs: - test-setup-python-older: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - [ - ubuntu-20.04, - ubuntu-22.04, - ubuntu-latest, - windows-latest, - macos-latest, - macos-13 - ] - python: [3.8.10, 3.8.18] - exclude: - - os: ubuntu-22.04 - python: '3.8.10' - - os: ubuntu-latest - python: '3.8.10' - - os: macos-latest - python: '3.8.18' - - os: windows-latest - python: '3.8.18' - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Run with setup-python ${{ matrix.python }} - id: setup-python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - name: Verify ${{ matrix.python }} - run: python __tests__/verify-python.py ${{ matrix.python }} - -# [tool.poetry] -# name = "sample-python" -# version = "0.1.0" -# description = "test" -# authors = ["Your Name "] -# readme = "README.md" - -# [tool.poetry.dependencies] -# python = "^3.8" - - -# [build-system] -# requires = ["poetry-core"] -# build-backend = "poetry.core.masonry.api" diff --git a/.github/workflows/test-sample.yml b/.github/workflows/test-sample.yml index 9760d3c..a2d9ab7 100644 --- a/.github/workflows/test-sample.yml +++ b/.github/workflows/test-sample.yml @@ -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 \ No newline at end of file + python-version: 3.8.10 + cache: 'pip' + + + - name: Display Python version + run: python --version + + - name: Install dependencies + run: pip install -r requirements.txt \ No newline at end of file