Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

108 project maintenance #110

Merged
merged 28 commits into from May 26, 2021
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
92 changes: 92 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,92 @@
name: tests

on: [push, pull_request]

jobs:

linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
restore-keys: ${{ runner.os }}-pip
- name: Install requirements
run: sudo apt-get install rrdtool librrd-dev
- name: Install Poetry
uses: snok/install-poetry@v1.1.1
with:
virtualenvs-create: true
virtualenvs-in-project: true
# virtualenvs-path: ~/.venv
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: timeout 10s poetry run pip --version || rm -rf .venv
# install dependencies if cache does not exist
- name: Check cache and install dependencies
vegu marked this conversation as resolved.
Show resolved Hide resolved
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Run linters
run: |
source .venv/bin/activate
# flake8 .
black . --check
isort .

test:
needs: linting
strategy:
fail-fast: true
matrix:
os: [ "ubuntu-latest" ]
python-version: [ "3.6", "3.7", "3.8", "3.9" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install requirements
run: sudo apt-get install rrdtool librrd-dev fping traceroute
- name: Install Poetry
uses: snok/install-poetry@v1.1.1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
- name: Ensure cache is healthy
if: steps.cache.outputs.cache-hit == 'true'
shell: bash
run: timeout 10s poetry run pip --version || rm -rf .venv
# install dependencies if cache does not exist
- name: Check cache and install dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Run tests
run: |
source .venv/bin/activate
pytest -vv --cov-report=term-missing --cov=${{ github.event.repository.name }} --cov-report=xml tests/
coverage report
# upload coverage stats
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
fail_ci_if_error: true
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

21 changes: 0 additions & 21 deletions Ctl/requirements-test.txt

This file was deleted.

7 changes: 0 additions & 7 deletions Ctl/requirements.txt

This file was deleted.

5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

15 changes: 8 additions & 7 deletions README.md
@@ -1,11 +1,12 @@

# Vaping

[![PyPI](https://img.shields.io/pypi/v/vaping.svg?maxAge=3600)](https://pypi.python.org/pypi/vaping)
[![PyPI](https://img.shields.io/pypi/pyversions/vaping.svg?maxAge=3600)](https://pypi.python.org/pypi/vaping)
[![Travis CI](https://img.shields.io/travis/20c/vaping.svg?maxAge=3600)](https://travis-ci.org/20c/vaping)
[![Codecov](https://img.shields.io/codecov/c/github/20c/vaping/master.svg?maxAge=3600)](https://codecov.io/github/20c/vaping)
[![Requires.io](https://img.shields.io/requires/github/20c/vaping.svg?maxAge=3600)](https://requires.io/github/20c/vaping/requirements)
[![PyPI](https://img.shields.io/pypi/v/vaping.svg?maxAge=60)](https://pypi.python.org/pypi/vaping)
[![PyPI](https://img.shields.io/pypi/pyversions/vaping.svg?maxAge=600)](https://pypi.python.org/pypi/vaping)
[![Tests](https://github.com/20c/vaping/workflows/tests/badge.svg)](https://github.com/20c/vaping)
[![Codecov](https://img.shields.io/codecov/c/github/20c/vaping/master.svg?maxAge=60)](https://codecov.io/github/20c/vaping)



vaping is a healthy alternative to smokeping!

Expand All @@ -17,7 +18,7 @@ Vaping was started after years of frustation from dealing with perl and
environment management for smokeping. It's a simple python daemon which uses
green threads to poll for input and send output through plugins.

It has a standalone mode to directly serve realtime graphs, or can use ZeroMQ
It has a standalone mode to direvapingy serve realtime graphs, or can use ZeroMQ
to distribute.


Expand Down Expand Up @@ -92,7 +93,7 @@ The current change log is available at <https://github.com/20c/vaping/blob/maste

## License

Copyright 2016-2019 20C, LLC
Copyright 2016-2021 20C, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this softare except in compliance with the License.
Expand Down