diff --git a/.github/actions/setup-dependencies-windows/action.yml b/.github/actions/setup-dependencies-windows/action.yml index 32ac1294..f8a8b4ff 100644 --- a/.github/actions/setup-dependencies-windows/action.yml +++ b/.github/actions/setup-dependencies-windows/action.yml @@ -12,15 +12,11 @@ inputs: runs: using: "composite" steps: - - name: Setup virtualenv + - name: Setup virtual environment and install dependencies shell: powershell run: | python -m venv .venv - .venv\Scripts\activate.ps1 - - - name: Install dependencies - shell: powershell - run: | + ${{ env.SCUBAGOGGLES_ACTIVATE_VENV }} python -m pip install . pip install -r requirements.txt pip install pytest @@ -29,5 +25,6 @@ runs: - name: Download OPA executable shell: powershell run: | + ${{ env.SCUBAGOGGLES_ACTIVATE_VENV }} scubagoggles setup -m -nc -nd -d ~/scubagoggles -r ~/scubagoggles -c credentials.json scubagoggles getopa -v ${{ inputs.opa-version }} diff --git a/.github/workflows/run_smoke_test.yml b/.github/workflows/run_smoke_test.yml index 5e02a9f1..b3297cc3 100644 --- a/.github/workflows/run_smoke_test.yml +++ b/.github/workflows/run_smoke_test.yml @@ -82,6 +82,12 @@ jobs: cache: "pip" cache-dependency-path: "requirements.txt" + - name: Virtual Environment Activation Definition + if: ${{ matrix.operating-system == 'windows-latest' }} + run: > + echo "SCUBAGOGGLES_ACTIVATE_VENV=.venv\Scripts\activate.ps1" + >> $GITHUB_ENV + - name: Setup Dependencies (Windows) if: ${{ matrix.operating-system == 'windows-latest' }} uses: ./.github/actions/setup-dependencies-windows @@ -106,4 +112,6 @@ jobs: json: ${{ secrets.GWS_GITHUB_AUTOMATION_CREDS }} - name: Run ScubaGoggles and check for correct output - run: pytest ./scubagoggles/Testing/Functional/SmokeTests/ -vvv --subjectemail="${{ secrets.GWS_SUBJECT_EMAIL }}" --customerdomain="${{ secrets.GWS_DOMAIN }}" + run: | + ${{ env.SCUBAGOGGLES_ACTIVATE_VENV }} + pytest ./scubagoggles/Testing/Functional/SmokeTests/ -vvv --subjectemail="${{ secrets.GWS_SUBJECT_EMAIL }}" --customerdomain="${{ secrets.GWS_DOMAIN }}"