Skip to content

Commit

Permalink
Merge pull request #39 from sommersoft/add_pr_tests
Browse files Browse the repository at this point in the history
Add Test Matrix For Pull Requests
  • Loading branch information
tannewt authored May 9, 2019
2 parents 7804a09 + 67abd08 commit 63c6be1
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ dist
circuitpython_build_tools/data/
.eggs
version.py
.env/*
36 changes: 32 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sudo: false
dist: trusty
dist: xenial
language: python
python:
- '3.6'
script:
- python3 -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/

before_deploy:
script:
- python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/

deploy:
provider: pypi
Expand All @@ -15,3 +15,31 @@ deploy:
skip_cleanup: true
on:
tags: true

matrix:
include:
- python: "3.6"
name: "Test CircuitPython Bundle"
if: type = pull_request
script:
- echo "Building mpy-cross" && echo "travis_fold:start:mpy-cross"
- python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/
- echo "travis_fold:end:mpy-cross"
- pip install -e .
- echo "Cloning Adafruit_CircuitPython_Bundle" && echo "travis_fold:start:clone"
- git clone --recurse-submodules https://github.com/adafruit/Adafruit_CircuitPython_Bundle.git
- echo "travis_fold:end:clone"
- cd Adafruit_CircuitPython_Bundle
- circuitpython-build-bundles --filename_prefix test-bundle --library_location libraries --library_depth 2

- python: "3.6"
name: "Test Single Library Bundle"
if: type = pull_request
script:
- echo "Building mpy-cross" && echo "travis_fold:start:mpy-cross"
- python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/
- echo "travis_fold:end:mpy-cross"
- pip install -e .
- git clone https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing.git
- cd Adafruit_CircuitPython_FeatherWing
- circuitpython-build-bundles --filename_prefix test-single --library_location .
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,21 @@ source .env/bin/activate
pip install circuitpython-build-tools
circuitpython-build-bundles --filename_prefix <output file prefix> --library_location .
```

When making changes to `circuitpython-build-tools` itself, you can test your changes
locally like so:

```shell
cd circuitpython-build-tools # this will be specific to your storage location
python3 -m venv .env
source .env/bin/activate
python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/
pip install -e . # '-e' is pip's "development" install feature
circuitpython-build-bundles --filename_prefix <output file prefix> --library_location <library location>
```

## Contributing

Contributions are welcome! Please read our [Code of Conduct]
(https://github.com/adafruit/Adafruit_CircuitPython_adabot/blob/master/CODE_OF_CONDUCT.md)
before contributing to help this project stay welcoming.

0 comments on commit 63c6be1

Please sign in to comment.