Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/python_package_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will install dependencies, build Pyctuator, run tests (+coverage) and lint

name: build

on:
push:
pull_request:

jobs:
run_image:
runs-on: [ubuntu-18.04]
container:
image: matanrubin/python-poetry:3.7

steps:
- uses: actions/checkout@v2
- run: cd ..
- run: make bootstrap
- run: poetry update -vvv
- run: poetry build -vvv
- run: make package
- run: poetry install --extras flask --extras fastapi --extras db --extras redis
- run: make coverage
- uses: actions/upload-artifact@v2
with:
name: htmlcov.zip
path: htmlcov/
# - run: poetry run pytest --cov=./ --cov-report xml:./cov.xml
- run: ls -la
- uses: codecov/codecov-action@v1
#with:
#token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
#file: ./coverage.xml # optional
#flags: unittests # optional
#name: codecov-umbrella # optional
#fail_ci_if_error: true # optional (default = false) - uses: actions/upload-artifact@v2

# Install the extra psutil module and run the tests in "with psutil" env
- run: poetry install --extras psutil
- run: make test

# Perform linting after all dependencies have been installed!
- run: make check
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ test:
poetry run pytest --log-cli-level=4 --tb=no -v tests

coverage:
poetry run pytest --cov-report html --cov-report term --cov=pyctuator --log-cli-level=4 --tb=no -v tests
poetry run pytest --cov-report xml:./cov.xml --cov-report html --cov-report term --cov=pyctuator --log-cli-level=4 --tb=no -v tests

pylint:
poetry run pylint --exit-zero pyctuator tests
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
![build](https://github.com/yanoom/pyctuator/workflows/build/badge.svg)
![codecov](https://codecov.io/gh/yanoom/pyctuator/branch/master/graph/badge.svg)

# Pyctuator

Pyctuator allows monitoring your Python microservice as if it were a Spring
Boot application using
Monitoring your Python microservices as if they were Spring
Boot applications using
[Spring Boot Admin](https://github.com/codecentric/spring-boot-admin).

The supported web frameworks are **Flask** and **FastAPI**.
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ redis = {version = "^3.3", optional = true}
requests = "^2.22"
pytest = "^3.0"
mypy = "^0.730.0"
pylint = "^2.4"
pylint = "~2.4.4" # v2.5 does not properly run on docker image...
pytest-cov = "^2.8"
autopep8 = "^1.4"

Expand Down