[GiotHub Actions] explicitly use virtual env

This commit is contained in:
MinchinWeb 2021-05-17 20:34:00 -06:00
parent 68c870a453
commit f4c9d68f50

View file

@ -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