From bd5d73d6246338ecbeb78760b0c1ef4424f74d32 Mon Sep 17 00:00:00 2001 From: Roy Lane Date: Thu, 16 Jan 2025 09:56:16 -0500 Subject: [PATCH] smoke_test: fix failure on Windows GitHub workflow --- .../actions/setup-dependencies-macos/action.yml | 14 ++++++++------ .../actions/setup-dependencies-windows/action.yml | 14 ++++++++------ .github/workflows/run_smoke_test.yml | 6 ++++-- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/actions/setup-dependencies-macos/action.yml b/.github/actions/setup-dependencies-macos/action.yml index a66ecb77..cf7b1b89 100644 --- a/.github/actions/setup-dependencies-macos/action.yml +++ b/.github/actions/setup-dependencies-macos/action.yml @@ -12,15 +12,16 @@ inputs: runs: using: "composite" steps: - - name: Setup virtualenv - shell: bash - run: | - python -m venv .venv - source .venv/bin/activate + - name: Virtual Environment Activation Definition - macOS or linux + run: > + echo "SCUBAGOGGLES_ACTIVATE_VENV=. .venv/bin/activate" + >> "$GITHUB_ENV" - - name: Install dependencies + - name: Setup virtual environment and install dependencies shell: bash run: | + python -m venv .venv + ${{ env.SCUBAGOGGLES_ACTIVATE_VENV }} python -m pip install . pip install -r requirements.txt pip install pytest @@ -29,5 +30,6 @@ runs: - name: Download OPA executable shell: bash 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/actions/setup-dependencies-windows/action.yml b/.github/actions/setup-dependencies-windows/action.yml index 32ac1294..8f10fb54 100644 --- a/.github/actions/setup-dependencies-windows/action.yml +++ b/.github/actions/setup-dependencies-windows/action.yml @@ -12,15 +12,16 @@ inputs: runs: using: "composite" steps: - - name: Setup virtualenv - shell: powershell - run: | - python -m venv .venv - .venv\Scripts\activate.ps1 + - name: Virtual Environment Activation Definition - Windows + run: > + echo "SCUBAGOGGLES_ACTIVATE_VENV=.venv\Scripts\activate.ps1" + >> "$GITHUB_ENV" - - name: Install dependencies + - name: Setup virtual environment and install dependencies shell: powershell run: | + python -m venv .venv + ${{ env.SCUBAGOGGLES_ACTIVATE_VENV }} python -m pip install . pip install -r requirements.txt pip install pytest @@ -29,5 +30,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..edcbfc3d 100644 --- a/.github/workflows/run_smoke_test.yml +++ b/.github/workflows/run_smoke_test.yml @@ -32,7 +32,7 @@ on: description: "Choose OPA version" required: true type: string - default: "v0.60.0" + default: "v1.0.0" jobs: configuration: @@ -106,4 +106,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 }}"