From 3d799fe7cd5c991ec550990ac04998a45930f72c Mon Sep 17 00:00:00 2001 From: Roy Lane Date: Thu, 16 Jan 2025 10:10:26 -0500 Subject: [PATCH] smoke_test: fix failure on Windows GitHub workflow --- .github/actions/setup-dependencies-macos/action.yml | 13 ++++++++----- .../actions/setup-dependencies-windows/action.yml | 13 ++++++++----- .github/workflows/run_smoke_test.yml | 6 ++++-- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/actions/setup-dependencies-macos/action.yml b/.github/actions/setup-dependencies-macos/action.yml index a66ecb77..85da279f 100644 --- a/.github/actions/setup-dependencies-macos/action.yml +++ b/.github/actions/setup-dependencies-macos/action.yml @@ -12,15 +12,17 @@ inputs: runs: using: "composite" steps: - - name: Setup virtualenv + - name: Virtual Environment Activation Definition - macOS or linux shell: bash - run: | - python -m venv .venv - source .venv/bin/activate + 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 +31,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..817c4207 100644 --- a/.github/actions/setup-dependencies-windows/action.yml +++ b/.github/actions/setup-dependencies-windows/action.yml @@ -12,15 +12,17 @@ inputs: runs: using: "composite" steps: - - name: Setup virtualenv + - name: Virtual Environment Activation Definition - Windows shell: powershell - run: | - python -m venv .venv - .venv\Scripts\activate.ps1 + run: > + echo "SCUBAGOGGLES_ACTIVATE_VENV=.venv\Scripts\activate.ps1" + >> "$Env: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 +31,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 }}"