PlatformIO Community

Travis CI Integration with for Platform.Io Library

As part of development and maintaining Arduino Compatible Libraries for Infineon Sensors, we wanted to integrate code coverage with our travis ci.
We are using python 3.7 and platformio ci for the build but could not integrate
As a test, I created a branch “test” in repository “DPS310-Pressure-Sensor” DPS310-Pressure-Sensor: branch-test.
The current travis.yml file is attached below:

    language: python
    - 3.7

    sudo: required

    cache: pip
      - master
      - dps310
      - test

        - PLATFORMIO_CI_SRC=examples/i2c_background
        - PLATFORMIO_CI_SRC=examples/i2c_command
        - PLATFORMIO_CI_SRC=examples/i2c_interrupt
        - PLATFORMIO_CI_SRC=examples/spi_background
        - PLATFORMIO_CI_SRC=examples/spi_command
        - PLATFORMIO_CI_SRC=examples/spi_interrupt

      - python3 -m pip install -U coverage codecov mypy

    # build with stable core    
    - pip install -U platformio
    - platformio platform install -f infineonxmc

    -  platformio ci --lib="."  --board=xmc1100_xmc2go --board=xmc1100_boot_kit --board=xmc4700_relax_kit --board=uno --board nodemcuv2

    #  - codecov

I tried finding any availbale resource but unfortunately it is just not working.
Any help or guide to point me to the right direction would be highly appreciated.
Thanks & Regards,

  • What resource are you refering to?
  • What exactly is not working? Any particular error message?

Hello @maxgerhardt,
I referred to travis documentation for and documentation for python too.
I already attached the .travis.yml file and this time I am attaching the error message:


10790.13s$ codecov


1081 _____ _

1082 / ____| | |

1083 | | ___ __| | ___ ___ _____ __

1084 | | / _ \ / _ |/ _ \/ __/ _ \ \ / /

1085 | |___| (_) | (_| | __/ (_| (_) \ V /

1086 \_____\___/ \____|\___|\___\___/ \_/

1087 v2.0.15


1089==> Detecting CI provider

1090 Travis Detected

1091==> Preparing upload

1092==> Processing gcov (disable by -X gcov)

1093 Executing gcov (find /home/travis/build/Infineon/DPS310-Pressure-Sensor -not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**' -type f -name '*.gcno' -exec gcov -pb {} +)

1094==> Collecting reports

1095Error: No coverage report found


1097Tip: See an example python repo:

1098Support channels:

1099 Email:

1100 IRC: #codecov

1101 Gitter:

1102 Twitter: @codecov

As you can see , after the build is success codecov is telling me that coverage is not found. So I changed my .travis.yml to the following:
- platformio ci coverage run --lib="." --board=xmc1100_xmc2go --board=xmc1100_boot_kit --board=xmc4700_relax_kit --board=uno --board nodemcuv2

When I change as above , I get the same error message.

Thanks ,

Well, that isn’t going to work because firstly that’s (coverage run) not a supported option for the ci command.

Do you really want the documentation for python when your code is C++? Skimming this stack overflow question, it sounds like you might want to use --project-option to add something like --project-option="build_flag=--coverage" which would add the --coverage flag to the gcc compiler, and then use the after_success config provided by the asker of the question.

Or everything I just said could be complete nonsense, as I don’t use!! :open_mouth: