Skip to content

Debug

Debug #4

on:
push:
pull_request:
name: Check python installation
jobs:
pythoninstall:
name: Test Python install
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
use-external-python: [true, false]
env:
python-test-package: python-dummy
steps:
- name: Get action path
run: echo "${{ github.repository }}@${{ github.ref_name }}"
- uses: actions/checkout@v4
- name: Install Python if required
if: ${{ matrix.use-external-python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install a test dependency if external Python is used
if: ${{ matrix.use-external-python }}
run:
pip install ${{ env.python-test-package }}
# - name: Test Action usage
# uses: "${{ github.repository }}@${{ github.ref_name }}"
# with:
# python-root-list: "./tests/*.py ./tests/subtest/*.py"
# use-black: true
# use-isort: true
# use-mypy: true
# use-pycodestyle: true
# use-pydocstyle: true
# extra-pycodestyle-options: "--max-line-length=88"
# use-pylint: false
# use-flake8: false
# use-vulture: true
# python-version: ${{ matrix.python-version }}
# use-external-python: ${{ matrix.use-external-python }}
- name: Check if test dependency exists after execution
description: "If use-external-python is set, then python test package should be installed. False otherwise"

Check failure on line 50 in .github/workflows/test-python-install.yml

View workflow run for this annotation

GitHub Actions / Check python installation

Invalid workflow file

The workflow is not valid. .github/workflows/test-python-install.yml (Line: 50, Col: 7): Unexpected value 'description'
run: |
pip freeze > all-deps.txt
should_appear=$( if [[ "${{ matrix.use-external-python }}" == "true" ]]; then echo 0; else echo 1; fi )
line_exists=$( grep -qF "${{ env.python-test-package }}" "all-deps.txt"; echo $? )
echo "test package should be installed: ${{ matrix.use-external-python }}"
test "$should_appear" == "line_exists"