From f4c9d68f50e5fa1d97ba5965fa90414b8b15a086 Mon Sep 17 00:00:00 2001 From: MinchinWeb Date: Mon, 17 May 2021 20:34:00 -0600 Subject: [PATCH] [GiotHub Actions] explicitly use virtual env --- .../workflows/testing_external_plugins.yaml | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/workflows/testing_external_plugins.yaml b/.github/workflows/testing_external_plugins.yaml index b0054347..160197f4 100644 --- a/.github/workflows/testing_external_plugins.yaml +++ b/.github/workflows/testing_external_plugins.yaml @@ -30,8 +30,6 @@ jobs: exclude: # Added for GitHub Actions PR problem 2020-12-19 -- remove later! - os: windows-latest python-version: 3.9 - - os: windows-latest - python-version: 3.8 steps: - uses: actions/checkout@v2 @@ -47,40 +45,37 @@ jobs: path: .venv key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-v2-namespace-plugins - - name: Set up and Activate Virtual Environment (Linux) - if: startsWith(matrix.os, 'ubuntu') - run: | - python -m venv .venv - source .venv/bin/activate - - - name: Set up and Activate Virtual Environment (Mac) - if: startsWith(matrix.os, 'macOS') - run: | - python -m venv .venv - source .venv/bin/activate - - - name: Set up and Activate Virtual Environment (Windows) - if: startsWith(matrix.os, 'windows') - run: | - python -m venv .venv - venv/Scripts/activate - - - name: Install dependencies + - name: Install dependencies (1 of 2) run: | python -m pip install pip --upgrade pip install poetry poetry config --local virtualenvs.in-project true poetry install --remove-untracked poetry install - poetry run python -m pip install ./tests/external_plugins_src/ + + - name: Activate Virtual Environment (Linux) + if: startsWith(matrix.os, 'ubuntu') + run: source .venv/bin/activate + + - name: Activate Virtual Environment (Mac) + if: startsWith(matrix.os, 'macOS') + run: source .venv/bin/activate + + - name: Activate Virtual Environment (Windows) + if: startsWith(matrix.os, 'windows') + run: venv/Scripts/activate + + - name: Install dependencies (2 of 2) + run: | + python -m pip install ./tests/external_plugins_src/ cd features # installed test plugins aren't recognized by "behave" if run from the # project's root folder - name: Test with pytest if: success() || failure() - run: poetry run pytest --junitxml=../reports/pytest/results.xml + run: pytest --junitxml=../reports/pytest/results.xml - name: Test with behave if: success() || failure() - run: poetry run behave --no-skipped --format progress2 --junit --junit-directory ../reports/behave + run: behave --no-skipped --format progress2 --junit --junit-directory ../reports/behave