From f22768681f7f2f3e3feae0f6bc73e9a8cc444e3c Mon Sep 17 00:00:00 2001 From: Boris Date: Thu, 19 Oct 2023 16:49:02 -0500 Subject: [PATCH] Update .env --- .github/workflows/test.yml | 4 ---- scripts/bootstrap_test_environment.sh | 22 ---------------------- scripts/update_dependencies.sh | 14 +++++++++++++- 3 files changed, 13 insertions(+), 27 deletions(-) delete mode 100755 scripts/bootstrap_test_environment.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3238bcd..4514f75 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,10 +33,6 @@ jobs: python-version: ${{ matrix.python-version }} - - name: Bootstrap Pip environment - shell: bash - run: scripts/bootstrap_test_environment.sh - - name: Install dependencies shell: bash run: bash scripts/update_dependencies.sh diff --git a/scripts/bootstrap_test_environment.sh b/scripts/bootstrap_test_environment.sh deleted file mode 100755 index 81ad19f..0000000 --- a/scripts/bootstrap_test_environment.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash -pip install pipenv - -# Check if a Pipenv environment already exists -if pipenv --venv &>/dev/null; then - echo "Pipenv environment already exists. No need to bootstrap" -else - # If Pipenv environment doesn't exist, create a new one - pipenv --python 3.12-service_wizard2 - echo "Created new Pipenv environment." - - # Install dependencies - pipenv install --dev - pipenv sync - echo "Installed dependencies." -fi - -# Activate the Pipenv environment -pipenv shell - -# Sync the dependencies -pipenv sync diff --git a/scripts/update_dependencies.sh b/scripts/update_dependencies.sh index 34c24a1..bb53cbe 100644 --- a/scripts/update_dependencies.sh +++ b/scripts/update_dependencies.sh @@ -1,8 +1,20 @@ #!/bin/bash + +if [ -z "$GITHUB_ACTION" ]; then + echo "This step is intended to be run from Github Actions" + pip install pipenv + rm Pipfile.lock + pipenv install --dev + pipenv sync --system --dev + exit 0 +fi + + + if [[ -n $VIRTUAL_ENV ]]; then echo "Pipenv shell is activated and ready for updates" - rm Pipfile.lock + pipenv install --dev pipenv sync echo "Updated dependencies for: `which python`"