From 3b3618ad68756920684598883d810a9851c63258 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Thu, 13 Jul 2023 12:38:02 +0200 Subject: [PATCH] change e2e pipenv tests --- .github/workflows/e2e-cache.yml | 18 ++++++++++++++++-- __tests__/test-pipenv.py | 7 +++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 __tests__/test-pipenv.py diff --git a/.github/workflows/e2e-cache.yml b/.github/workflows/e2e-cache.yml index e4a87f25..2c22cb9d 100644 --- a/.github/workflows/e2e-cache.yml +++ b/.github/workflows/e2e-cache.yml @@ -43,22 +43,29 @@ 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 . + - name: Install dependencies + shell: pwsh + if: steps.cache-pipenv.outputs.cache-hit != 'true' + run: | if ("${{ matrix.python-version }}" -Match "pypy") { pipenv install --python pypy # --keep-outdated } else { pipenv install --python ${{ matrix.python-version }} # --keep-outdated } + - run: python test-pipenv.py python-poetry-dependencies-caching: name: Test poetry (Python ${{ matrix.python-version}}, ${{ matrix.os }}) @@ -112,6 +119,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Setup Python + id: cache-pipenv uses: ./ with: python-version: ${{ matrix.python-version }} @@ -119,13 +127,19 @@ jobs: 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 . + - name: Install dependencies + shell: pwsh + if: steps.cache-pipenv.outputs.cache-hit != 'true' + run: | if ("${{ matrix.python-version }}" -Match "pypy") { pipenv install --python pypy # --keep-outdated } else { pipenv install --python ${{ matrix.python-version }} # --keep-outdated } + - run: python test-pipenv.py diff --git a/__tests__/test-pipenv.py b/__tests__/test-pipenv.py new file mode 100644 index 00000000..e5820786 --- /dev/null +++ b/__tests__/test-pipenv.py @@ -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)) \ No newline at end of file