Skip to content

Commit 63c6be1

Browse files
authored
Merge pull request #39 from sommersoft/add_pr_tests
Add Test Matrix For Pull Requests
2 parents 7804a09 + 67abd08 commit 63c6be1

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ dist
77
circuitpython_build_tools/data/
88
.eggs
99
version.py
10+
.env/*

.travis.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
sudo: false
2-
dist: trusty
1+
dist: xenial
32
language: python
43
python:
54
- '3.6'
6-
script:
7-
- python3 -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/
85

6+
before_deploy:
7+
script:
8+
- python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/
99

1010
deploy:
1111
provider: pypi
@@ -15,3 +15,31 @@ deploy:
1515
skip_cleanup: true
1616
on:
1717
tags: true
18+
19+
matrix:
20+
include:
21+
- python: "3.6"
22+
name: "Test CircuitPython Bundle"
23+
if: type = pull_request
24+
script:
25+
- echo "Building mpy-cross" && echo "travis_fold:start:mpy-cross"
26+
- python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/
27+
- echo "travis_fold:end:mpy-cross"
28+
- pip install -e .
29+
- echo "Cloning Adafruit_CircuitPython_Bundle" && echo "travis_fold:start:clone"
30+
- git clone --recurse-submodules https://github.com/adafruit/Adafruit_CircuitPython_Bundle.git
31+
- echo "travis_fold:end:clone"
32+
- cd Adafruit_CircuitPython_Bundle
33+
- circuitpython-build-bundles --filename_prefix test-bundle --library_location libraries --library_depth 2
34+
35+
- python: "3.6"
36+
name: "Test Single Library Bundle"
37+
if: type = pull_request
38+
script:
39+
- echo "Building mpy-cross" && echo "travis_fold:start:mpy-cross"
40+
- python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/
41+
- echo "travis_fold:end:mpy-cross"
42+
- pip install -e .
43+
- git clone https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing.git
44+
- cd Adafruit_CircuitPython_FeatherWing
45+
- circuitpython-build-bundles --filename_prefix test-single --library_location .

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,21 @@ source .env/bin/activate
5656
pip install circuitpython-build-tools
5757
circuitpython-build-bundles --filename_prefix <output file prefix> --library_location .
5858
```
59+
60+
When making changes to `circuitpython-build-tools` itself, you can test your changes
61+
locally like so:
62+
63+
```shell
64+
cd circuitpython-build-tools # this will be specific to your storage location
65+
python3 -m venv .env
66+
source .env/bin/activate
67+
python3 -u -m circuitpython_build_tools.scripts.build_mpy_cross circuitpython_build_tools/data/
68+
pip install -e . # '-e' is pip's "development" install feature
69+
circuitpython-build-bundles --filename_prefix <output file prefix> --library_location <library location>
70+
```
71+
72+
## Contributing
73+
74+
Contributions are welcome! Please read our [Code of Conduct]
75+
(https://github.com/adafruit/Adafruit_CircuitPython_adabot/blob/master/CODE_OF_CONDUCT.md)
76+
before contributing to help this project stay welcoming.

0 commit comments

Comments
 (0)