File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Check Python venv virtual environment
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ # Only watch changes related to Python virtual environment venv
8+ paths :
9+ - ' requirements.txt'
10+ - ' scripts/activatePythonEnvironment.sh'
11+ - ' .github/workflows/internal-check-python-venv-support.yml' # or when this file changed
12+
13+ jobs :
14+ check-python-venv-environment :
15+ runs-on : ubuntu-latest
16+ strategy :
17+ matrix :
18+ include :
19+ - os : ubuntu-22.04
20+ python : 3.12
21+
22+ steps :
23+ - name : Checkout GIT Repository
24+ uses : actions/checkout@v4
25+
26+ - name : (Python Setup) Use version ${{ matrix.python }} with venv environment management module
27+ uses : actions/setup-python@v5
28+ with :
29+ python-version : ${{ matrix.python }}
30+ cache : ' pip'
31+
32+ - name : Create, activate, install and check virtual environment
33+ run : |
34+ ./scripts/activatePythonEnvironment.sh
35+ pip install --dry-run --no-deps --requirement "./requirements.txt" 2>/dev/null | grep -q "Would install" || return 1
36+
37+ - name : TODO Delete DRAFT Check the opposite
38+ run : |
39+ ./scripts/activatePythonEnvironment.sh
40+ pip install --dry-run --no-deps --requirement "./requirements.txt" 2>/dev/null | grep -q "Already satisfied" || return 1
You can’t perform that action at this time.
0 commit comments