west/.shippable.yml

18 lines
715 B
YAML
Raw Normal View History

language: python
# TODO: 3.7 is failing. It'd be good to figure this out eventually as
# it's the latest version which is likely what Windows and macOS users
# run on, but is left out for now.
python:
- 3.4 # minimum supported version
- 3.5 # ubuntu 16.04
- 3.6 # ubuntu 18.04
build:
ci:
- pip install -r requirements.txt
- pip install -r tests_requirements.txt
- pip install -e .
- mkdir -p shippable/{testresults,codecoverage}
Add self-update for West and the manifest The self-update mechanism checks the West and manifest repositories in west/ for upstream changes and rebases them to the latest version if any are found. 'west fetch' and 'west pull' run a self-update before fetching any project data. It probably makes sense to always work with the latest version of West and the manifest there. The self-update can be suppressed with --no-update. There's also a 'west update' command for manually updating West and/or the manifest. West automatically restarts itself after a self-update, before running any commands or parsing the manifest. This makes it safe to add a new feature to West and immediately start using it in the manifest. The restarting is done with a plain exec(3). Getting this to work required a few changes: - West now uses absolute instead of relative imports, to make it possible to execute src/west/main.py directly. This also makes it a bit simpler to work on West. Relative imports seem to be discouraged when googling around a bit. __init__.py was removed from src/west. West is more of an application than a package now (though it uses some packages internally). - The internal 'cmd' package was renamed to 'commands', to avoid clashing with a module in the Python standard library. 'runner' was renamed to 'runners' as well, for consistency. The tests now have to be run from the West repository root with 'PYTHONPATH=src/west pytest'. The previous testing setup "just working" relied on having run 'pip3 install -e .' first, which happened to add src/west to the path due to the bootstrap script being there. __init__.py was removed from the test directories as well. Packages mostly make sense for tests if there are naming collisions, and naming collisions will be obvious if packages aren't used. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-09-21 20:25:44 +08:00
- PYTHONPATH=src/west pytest --junitxml=shippable/testresults/nosetests.xml tests
- PYTHONPATH=src/west pytest --cov=west --cov-report=xml:shippable/codecoverage/coverage.xml tests