mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-19 04:28:31 +02:00
[GiotHub Actions] explicitly use virtual env
This commit is contained in:
parent
68c870a453
commit
f4c9d68f50
1 changed files with 19 additions and 24 deletions
43
.github/workflows/testing_external_plugins.yaml
vendored
43
.github/workflows/testing_external_plugins.yaml
vendored
|
@ -30,8 +30,6 @@ jobs:
|
||||||
exclude: # Added for GitHub Actions PR problem 2020-12-19 -- remove later!
|
exclude: # Added for GitHub Actions PR problem 2020-12-19 -- remove later!
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
- os: windows-latest
|
|
||||||
python-version: 3.8
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -47,40 +45,37 @@ jobs:
|
||||||
path: .venv
|
path: .venv
|
||||||
key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-v2-namespace-plugins
|
key: ${{ runner.os }}-${{ hashFiles('poetry.lock') }}-${{ matrix.python-version }}-v2-namespace-plugins
|
||||||
|
|
||||||
- name: Set up and Activate Virtual Environment (Linux)
|
- name: Install dependencies (1 of 2)
|
||||||
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
|
|
||||||
run: |
|
run: |
|
||||||
python -m pip install pip --upgrade
|
python -m pip install pip --upgrade
|
||||||
pip install poetry
|
pip install poetry
|
||||||
poetry config --local virtualenvs.in-project true
|
poetry config --local virtualenvs.in-project true
|
||||||
poetry install --remove-untracked
|
poetry install --remove-untracked
|
||||||
poetry install
|
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
|
cd features
|
||||||
# installed test plugins aren't recognized by "behave" if run from the
|
# installed test plugins aren't recognized by "behave" if run from the
|
||||||
# project's root folder
|
# project's root folder
|
||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
if: success() || failure()
|
if: success() || failure()
|
||||||
run: poetry run pytest --junitxml=../reports/pytest/results.xml
|
run: pytest --junitxml=../reports/pytest/results.xml
|
||||||
|
|
||||||
- name: Test with behave
|
- name: Test with behave
|
||||||
if: success() || failure()
|
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
|
||||||
|
|
Loading…
Add table
Reference in a new issue