Support Python's build-in module venv for virtual environments additionally to Conda #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Python venv virtual environment | |
on: | |
pull_request: | |
branches: | |
- main | |
# Only watch changes related to Python virtual environment venv | |
paths: | |
- 'requirements.txt' | |
- 'scripts/activatePythonEnvironment.sh' | |
- '.github/workflows/internal-check-python-venv-support.yml' # or when this file changed | |
jobs: | |
check-python-venv-environment: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-22.04 | |
python: 3.12 | |
steps: | |
- name: Checkout GIT Repository | |
uses: actions/checkout@v4 | |
- name: (Python Setup) Use version ${{ matrix.python }} with venv environment management module | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
cache: 'pip' | |
- name: Create, activate, install and check virtual environment | |
env: | |
USE_VIRTUAL_PYTHON_ENVIRONMENT_VENV: "true" | |
run: | | |
./scripts/activatePythonEnvironment.sh | |
pip install --dry-run --no-deps --requirement "./requirements.txt" 2>/dev/null | grep -q "Would install" || return 1 | |
- name: TODO Delete DRAFT Check the opposite | |
env: | |
USE_VIRTUAL_PYTHON_ENVIRONMENT_VENV: "true" | |
run: | | |
./scripts/activatePythonEnvironment.sh | |
pip install --dry-run --no-deps --requirement "./requirements.txt" 2>/dev/null | grep -q "Already satisfied" || return 1 |