Skip to content

Commit

Permalink
Merge pull request #15 from daminijain23/master
Browse files Browse the repository at this point in the history
Added GitHub Actions
  • Loading branch information
rohanpm committed Sep 28, 2021
2 parents b9e4030 + 4854bb8 commit 14d0ed8
Show file tree
Hide file tree
Showing 4 changed files with 140 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/docs.yml
@@ -0,0 +1,28 @@
name: Publish docs

on:
push:
branches:
- master
workflow_dispatch: {}

jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install system dependencies
run: sudo apt-get install -y libkrb5-dev
- name: Install Tox
run: pip install tox
- name: Run Tox
run: tox -e docs
- name: Publish
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: docs/_build/html
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,27 @@
name: Release on PyPI

on:
push:
tags:
- v*

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
82 changes: 82 additions & 0 deletions .github/workflows/tox-test.yml
@@ -0,0 +1,82 @@
name: Tox tests

on: [push, pull_request]

jobs:
py27:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install RPM
run: sudo apt-get install -y rpm libkrb5-dev
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 2.7
- name: Install Tox
run: pip install tox
- name: Run Tox
run: tox -e py27
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install RPM
run: sudo apt-get install -y rpm libkrb5-dev
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Tox
run: pip install tox
- name: Run Tox
run: tox -e static
pidiff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install RPM
run: sudo apt-get install -y rpm
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Tox
run: pip install tox
- name: Run Tox
run: tox -e pidiff
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install RPM
run: sudo apt-get install -y rpm libkrb5-dev
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Tox
run: pip install tox
- name: Run Tox
run: tox -e cov
- name: Install pytest cov
run: pip install pytest-cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.15
with:
fail_ci_if_error: true
verbose: true
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install RPM
run: sudo apt-get install -y rpm
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install Tox
run: pip install tox
- name: Run Tox
run: tox -e docs
5 changes: 3 additions & 2 deletions tox.ini
Expand Up @@ -18,10 +18,11 @@ deps=
deps=
-rtest-requirements.txt
black
pylint
pylint==2.5.3
astroid==2.4.2
commands=
black --check .
sh -c 'pylint src; test $(( $? & (1|2|4|32) )) = 0'
sh -c 'pylint pushcollector; test $(( $? & (1|2|4|32) )) = 0'

[testenv:pidiff]
deps=pidiff
Expand Down

0 comments on commit 14d0ed8

Please sign in to comment.