Skip to content

Commit

Permalink
Use python instead of python3
Browse files Browse the repository at this point in the history
  • Loading branch information
EnricoMi committed Apr 4, 2024
1 parent 6e3d799 commit dea09a7
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ runs:
- name: Install Python dependencies
run: |
pwd
python3 -V
which python3
python -V
which python
echo "creating venv"
python3 -m venv --verbose "venv"
python -m venv "venv"
echo "venv created"
ls -lah "venv"
ls -lah "venv/Scripts"
Expand All @@ -78,29 +78,29 @@ runs:
echo "$PATH"
export PATH="venv/bin:venv/Scripts:$PATH"
echo "$PATH"
which python3
which python
# inspect pip cache
python3 -m pip freeze | sort
python3 -m pip cache info || true
python3 -m pip cache list || true
python -m pip freeze | sort
python -m pip cache info || true
python -m pip cache list || true
# remove cached built whl files
rm -rf "$(python3 -m pip cache info | grep "Locally built wheels location: " | cut -d ":" -f 2- | cut -d " " -f 2-)"
python3 -m pip cache list || true
rm -rf "$(python -m pip cache info | grep "Locally built wheels location: " | cut -d ":" -f 2- | cut -d " " -f 2-)"
python -m pip cache list || true
# install dependencies
python_minor_version="$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
python3 -m pip install --force -r python/requirements-$python_minor_version.txt
python3 -m pip install --force -r python/test/requirements.txt -c python/test/constraints.txt
python_minor_version="$(python -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')"
python -m pip install --force -r python/requirements-$python_minor_version.txt
python -m pip install --force -r python/test/requirements.txt -c python/test/constraints.txt
# inspect pip cache
python3 -m pip freeze | sort
python3 -m pip cache info || true
python3 -m pip cache list || true
python -m pip freeze | sort
python -m pip cache info || true
python -m pip cache list || true
# assert no whl files have been built
if [ python3 -m pip cache info ] && [ "$(python3 -m pip cache info | grep "Number of locally built wheels:")" != "Number of locally built wheels: 0" ]
if [ python -m pip cache info ] && [ "$(python -m pip cache info | grep "Number of locally built wheels:")" != "Number of locally built wheels: 0" ]
then
echo "Dependency whl files have been built"
exit 1
Expand Down Expand Up @@ -137,7 +137,7 @@ runs:
PYTHONPATH: ..
run: |
cd python/test
python3 -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest.xml
python -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest.xml
shell: bash

- name: PyTest (EST)
Expand All @@ -147,7 +147,7 @@ runs:
PYTHONPATH: ..
run: |
cd python/test
python3 -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest-est.xml
python -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest-est.xml
shell: bash

- name: PyTest (CET)
Expand All @@ -157,7 +157,7 @@ runs:
PYTHONPATH: ..
run: |
cd python/test
python3 -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest-cet.xml
python -m pytest --capture=tee-sys --continue-on-collection-errors --junit-xml ../../test-results/pytest-cet.xml
shell: bash

- name: Upload Test Results
Expand Down

0 comments on commit dea09a7

Please sign in to comment.