Add package testing to CI (#68)

* Make `build_examples.py` callable from python
* Allow tests to run from outside project directory
* Add invoke tasks
* Add server tests
* Run travis tests against wheel package instead of local code
* Update `badge.write_badge()` to support `pathlib.Path`
* Update `CONTRIBUTING.md`
This commit is contained in:
Jon Grace-Cox
2022-08-13 13:22:15 -04:00
committed by GitHub
parent 9b7318417d
commit 1c986d4ad8
15 changed files with 308 additions and 34 deletions

View File

@@ -1,14 +1,13 @@
import anybadge
if __name__ == "__main__":
def main():
print(
"""
| Color Name | Hex | Example |
| ------------- | ------- | ------- |"""
)
for color in sorted(anybadge.colors.Color):
file = "examples/color_" + color.name.lower() + ".svg"
url = "https://cdn.rawgit.com/jongracecox/anybadge/master/" + file
@@ -20,3 +19,7 @@ if __name__ == "__main__":
print(
f"| {color.name.lower():<13} | {color.value.upper():<7} | ![]({f'{url})':<84}|"
)
if __name__ == "__main__":
main()