How to run test_script only for certain members/jobs of build matrix

jonathan.underwood's Avatar

jonathan.underwood

06 Dec, 2017 08:34 PM

I have a build matrix defined like this:

environment:
  matrix:
    - PYTHON: "C:\\Python36"
    - PYTHON: "C:\\Python27-x64"
      DISTUTILS_USE_SDK: "1"
    - PYTHON: "C:\\Python27"
    - PYTHON: "C:\\Python34"
    - PYTHON: "C:\\Python35"
    - PYTHON: "C:\\Python34-x64"
      DISTUTILS_USE_SDK: "1"
    - PYTHON: "C:\\Python35-x64"
    - PYTHON: "C:\\Python36-x64"

and later I run a simple test script:

test_script:
  - "build.cmd tox"

What I'd like to do is only run the test_script for the 64 bit Python jobs. What's the best way to achieve that?

  1. Support Staff 1 Posted by Ilya Finkelshte... on 06 Dec, 2017 09:00 PM

    Ilya Finkelshteyn's Avatar

    Something like this should work.

    test_script:
      - ps: $env:is64bit = $env:PYTHON.Contains("-x64")
      - IF %is64bit% == True build.cmd tox
    
  2. 2 Posted by jonathan.underw... on 06 Dec, 2017 11:09 PM

    jonathan.underwood's Avatar

    Yes, perfect - that works. Thank you very much!

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