if condition based on python version

giampaolo rodola's Avatar

giampaolo rodola

03 May, 2017 05:53 PM

Hello and thanks for this absolutely great service. I would like to run certain tests only for a certain python major/minor version pair (2.7 and 3.5). I would like to do something like this in appveyor.yml but I'm not sure how:

test_script:
  - "%WITH_COMPILER% %PYTHON%/python -V"
  - "%WITH_COMPILER% %PYTHON%/python psutil/tests/__main__.py"
- ps: >-
    If $PY_MIN_MAJ_VERSION == 2.7 || $PY_MIN_MAJ_VERSION == 3.5 {       
        - "%WITH_COMPILER% %PYTHON%/python psutil/tests/test_memleaks.py"          
    }

Any advice?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 03 May, 2017 06:22 PM

    Ilya Finkelshteyn's Avatar

    Hi Giampaolo!

    Thank you :)

    Please take a look at build matrix. With it you should be able to run multiple build jobs with different values of the same environment variables.

    Ilya.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac