@@ -481,26 +481,30 @@ jobs:
481481 run : |
482482 if [ -f "poetry.lock" ]
483483 then
484+ python${{ env.PYTHON_VERSION }} -m pip install poetry==${{ env.POETRY_VERSION }} poetry-plugin-export==${{ env.POETRY_EXPORT_PLUGIN_VERSION }}
484485 mkdir -p package/lib || true
485- python${{ env.PYTHON_VERSION }} -m pip install poetry==${{ env.POETRY_VERSION }} poetry-plugin-export==${{ env.POETRY_EXPORT_PLUGIN_VERSION }}
486- poetry check
486+ poetry check --lock
487487 poetry export --without-hashes -o package/lib/requirements.txt
488488 fi
489- if [ ! -f dev_deps/requirements_dev.txt ]; then echo no dev_deps/requirements;exit 1 ;fi
489+ if [ ! -f dev_deps/requirements_dev.txt ]; then
490+ echo "No dev_deps/requirements_dev.txt. Migrate your dependencies to dev_deps/requirements_dev.txt"
491+ exit 1
492+ else
493+ echo "Found dev_deps/requirements_dev.txt. Installing dev dependencies in an isolated environment";
494+ fi
490495 git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
491496 git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://git@github.com
492- python${{ env.PYTHON_VERSION }} -m venv .dev_venv
493- echo "Found requirements_dev.txt. Installing dev dependencies in an isolated environment"
494- ./.dev_venv/bin/python${{ env.PYTHON_VERSION }} -m pip install -r dev_deps/requirements_dev.txt
495- ./.dev_venv/bin/python${{ env.PYTHON_VERSION }} -m pip install -r package/lib/requirements.txt
497+ python${{ env.PYTHON_VERSION }} -m venv ~/.dev_venv
498+ ~/.dev_venv/bin/python${{ env.PYTHON_VERSION }} -m pip install -r dev_deps/requirements_dev.txt
499+ ~/.dev_venv/bin/python${{ env.PYTHON_VERSION }} -m pip install -r package/lib/requirements.txt
496500 - name : Create directories
497501 run : |
498502 mkdir -p /opt/splunk/var/log/splunk
499503 chmod -R 777 /opt/splunk/var/log/splunk
500504 - name : Copy pytest ini
501505 run : cp tests/unit/pytest-ci.ini pytest.ini
502506 - name : Run Pytest with coverage
503- run : . /.dev_venv/bin/python${{ env.PYTHON_VERSION }} -m pytest --cov=./ --cov-report=xml --junitxml=test-results/junit.xml tests/unit
507+ run : ~ /.dev_venv/bin/python${{ env.PYTHON_VERSION }} -m pytest --cov=./ --cov-report=xml --junitxml=test-results/junit.xml tests/unit
504508 - name : Job summary
505509 continue-on-error : true
506510 run : |
@@ -574,11 +578,11 @@ jobs:
574578 - name : Setup UCC
575579 run : |
576580 if [ -f "dev_deps/requirements_ucc.txt" ]; then
577- python${{ env.PYTHON_VERSION }} -m venv .ucc_venv
578581 echo "Found requirements_ucc.txt. Installing UCC dependencies in an isolated environment"
579- ./.ucc_venv/bin/python${{ env.PYTHON_VERSION }} -m pip install -r dev_deps/requirements_ucc.txt
580- export UCC_GEN="$PWD/.ucc_venv/bin/ucc-gen"
581-
582+ python${{ env.PYTHON_VERSION }} -m venv ~/.ucc_venv
583+ ~/.ucc_venv/bin/python${{ env.PYTHON_VERSION }} -m pip install -r dev_deps/requirements_ucc.txt
584+ export UCC_GEN="$HOME/.ucc_venv/bin/ucc-gen"
585+
582586 if [ ! -f "$UCC_GEN" ]; then
583587 echo "ucc-gen not found after installing requirements from dev_deps/requirements_ucc.txt"
584588 exit 1
@@ -587,7 +591,8 @@ jobs:
587591 echo "UCC_GEN=$UCC_GEN" >> "$GITHUB_ENV"
588592 else
589593 echo "No UCC requirements file found, skipping UCC setup"
590- echo "Consider adding a dev_deps/requirements_ucc.txt file and place UCC requirement there, to avoid dependency conflicts"
594+ echo "Create a dev_deps/requirements_ucc.txt file and place UCC requirement there, to avoid dependency conflicts"
595+ exit 1
591596 fi
592597 - name : Get pip cache dir
593598 id : pip-cache
@@ -604,12 +609,6 @@ jobs:
604609 key : ${{ runner.os }}-pip-${{ hashFiles('dev_deps/requirements_dev.txt') }}
605610 restore-keys : |
606611 ${{ runner.os }}-pip-
607- - name : Install deps
608- if : ${{ steps.checklibs.outputs.ENABLED == 'true' }}
609- run : |
610- git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf https://github.com
611- git config --global --add url."https://${{ secrets.GH_TOKEN_ADMIN }}@github.com".insteadOf ssh://git@github.com
612- python${{ env.PYTHON_VERSION }} -m pip install -r dev_deps/requirements_dev.txt
613612 - name : Semantic Release Get Next
614613 id : semantic
615614 if : github.event_name != 'pull_request'
@@ -902,11 +901,12 @@ jobs:
902901 env :
903902 PYTHON_KEYRING_BACKEND : keyring.backends.null.Keyring
904903 run : |
905- python${{ env.PYTHON_VERSION }} -m pip install -r dev_deps/requirements_dev.txt
904+ python${{ env.PYTHON_VERSION }} -m venv ~/.dev_venv
905+ ~/.dev_venv/bin/python${{ env.PYTHON_VERSION }} -m pip install -r dev_deps/requirements_dev.txt
906906 if [ -f "tests/ucc_modinput_functional/tmp/openapi.json" ]; then
907- ucc-test-modinput gen -o tests/ucc_modinput_functional/tmp/openapi.json -t ${{ steps.download-openapi.outputs.download-path }}/tmp/
907+ ~/.dev_venv/bin/ ucc-test-modinput gen -o tests/ucc_modinput_functional/tmp/openapi.json -t ${{ steps.download-openapi.outputs.download-path }}/tmp/
908908 else
909- ucc-test-modinput gen -o ${{ steps.download-openapi.outputs.download-path }}/openapi.json -t ${{ steps.download-openapi.outputs.download-path }}/tmp/
909+ ~/.dev_venv/bin/ ucc-test-modinput gen -o ${{ steps.download-openapi.outputs.download-path }}/openapi.json -t ${{ steps.download-openapi.outputs.download-path }}/tmp/
910910 fi
911911 - name : upload-libs-to-s3
912912 id : upload-libs-to-s3
@@ -915,11 +915,11 @@ jobs:
915915 AWS_DEFAULT_REGION : ${{ secrets.AWS_DEFAULT_REGION }}
916916 AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
917917 run : |
918- python${{ env.PYTHON_VERSION }} -m venv .dev_venv
918+ python${{ env.PYTHON_VERSION }} -m venv ~/ .dev_venv
919919 echo "Found requirements_dev.txt. Installing dev dependencies in an isolated environment"
920- . /.dev_venv/bin/python${{ env.PYTHON_VERSION }} -m pip install -r dev_deps/requirements_dev.txt
920+ ~ /.dev_venv/bin/python${{ env.PYTHON_VERSION }} -m pip install -r dev_deps/requirements_dev.txt
921921 libs_archive=libs_$(basename "$BUILD_NAME" .spl).tgz
922- cp -r . /.dev_venv/lib/python${{ env.PYTHON_VERSION }}/site-packages/ libs/
922+ cp -r ~ /.dev_venv/lib/python${{ env.PYTHON_VERSION }}/site-packages/ libs/
923923 tar -czf "$libs_archive" libs
924924 aws s3 cp "$libs_archive" "s3://${{ needs.setup-workflow.outputs.s3_bucket_k8s }}/ta-apps/$libs_archive" --only-show-errors
925925 - name : upload-swagger-artifacts-to-s3
0 commit comments